Icosa-Gallery
Open, decentralised platform for 3D assets
Declared in: projects/Icosa-Gallery/default.nix
Try the service in a VM
-
Install Nix
- Bash
-
$ curl -sSfL https://artifacts.nixos.org/nix-installer | sh -s -- install # to uninstall, run: $ /nix/nix-installer uninstall
- Bash
-
$ apt install --yes curl git jq nix
- Bash
-
$ apt install --yes curl git jq nix
- Bash
-
$ pacman --sync --refresh --noconfirm curl git jq nix
- Bash
-
$ dnf install -y curl git jq nix
-
Download a configuration file
# default.nix { ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/main") { }, }: ngipkgs.demo-vm ( { pkgs, ... }: { services.icosa-gallery = { enable = true; openFirewall = true; port = 8080; enableLocalDB = true; settings = { # Do *NOT* do this in production! POSTGRES_PASSWORD = "icosa-gallery"; DJANGO_SECRET_KEY = "g3tu0@_-fvhdn&p09mv)x9+x6^7q58&&r9l*k61k-m2f72j&z"; JWT_SECRET_KEY = "sd2k+@tt0x22_))w9wtv(h1278bc#mkd7jna5nannws(4vr^7"; DJANGO_DISABLE_CACHE = "1"; DEPLOYMENT_NO_SSL = "1"; DEPLOYMENT_ENV = "local"; }; }; # Do *NOT* do this in production! services.postgresql.initialScript = pkgs.writeText "init-sql-script" '' CREATE ROLE "icosa-gallery" LOGIN PASSWORD 'icosa-gallery'; ''; } )
-
Enable binary substituters
- Bash
-
$ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/ trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ngi.cachix.org-1:n+CAL72ROC3qQuLxIHpV+Tw5t42WhXmMhprAGkRSrOw='
-
Build and run a virtual machine
- Bash
-
$ nix-build ./default.nix && ./result
- Bash
-
$ nix-build ./default.nix && ./result
- Bash
-
$ rev=$(nix-instantiate --eval --attr sources.nixpkgs.rev https://github.com/ngi-nix/ngipkgs/archive/master.tar.gz | jq --raw-output)$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$rev.tar.gz --packages nix --run "nix-build ./default.nix && ./result"
- Bash
-
$ nix-build ./default.nix && ./result
- Bash
-
$ nix-build ./default.nix && ./result
- Missing Contribute usage instructions.
Options
services.icosa-gallery
-
Database host address.
- Type:
string- Default:
"127.0.0.1"- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
Database name.
- Type:
string- Default:
"icosa-gallery"- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
Database user.
- Type:
string- Default:
"icosa-gallery"- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
Whether to enable Icosa Gallery.
- Type:
boolean- Default:
false- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
Whether to enable a local database for Icosa Gallery.
- Type:
boolean- Default:
false- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
The host where Icosa Gallery is accessible.
- Type:
string- Default:
"127.0.0.1"- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
Whether to open ports in the firewall.
- Type:
boolean- Default:
false- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
The icosa-gallery package to use.
- Type:
package- Default:
pkgs.icosa-gallery- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
The port where Icosa Gallery is accessible.
- Type:
16 bit unsigned integer; between 0 and 65535 (both inclusive)- Default:
8000- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
-
Configuration for Icosa Gallery, will be passed as environment variables. See https://github.com/icosa-foundation/icosa-gallery/blob/main/django/django_project/settings.py.
- Type:
open submodule of attribute set of string- Default:
{ }- Declared in:
- projects/Icosa-Gallery/services/icosa-gallery/module.nix
services.icosa-gallery.database.host
services.icosa-gallery.database.name
services.icosa-gallery.database.user
services.icosa-gallery.enable
services.icosa-gallery.enableLocalDB
services.icosa-gallery.host
services.icosa-gallery.openFirewall
services.icosa-gallery.package
services.icosa-gallery.port
services.icosa-gallery.settings
Examples
Enable icosa-gallery
{ pkgs, ... }: { services.icosa-gallery = { enable = true; openFirewall = true; port = 8080; enableLocalDB = true; settings = { # Do *NOT* do this in production! POSTGRES_PASSWORD = "icosa-gallery"; DJANGO_SECRET_KEY = "g3tu0@_-fvhdn&p09mv)x9+x6^7q58&&r9l*k61k-m2f72j&z"; JWT_SECRET_KEY = "sd2k+@tt0x22_))w9wtv(h1278bc#mkd7jna5nannws(4vr^7"; DJANGO_DISABLE_CACHE = "1"; DEPLOYMENT_NO_SSL = "1"; DEPLOYMENT_ENV = "local"; }; }; # Do *NOT* do this in production! services.postgresql.initialScript = pkgs.writeText "init-sql-script" '' CREATE ROLE "icosa-gallery" LOGIN PASSWORD 'icosa-gallery'; ''; }
Declared in: projects/Icosa-Gallery/services/icosa-gallery/examples/basic.nix
Metadata
This project is funded by NLnet through these subgrants:
- Commons
- Icosa-Gallery
- Entrust
- IcosaGallery
Related links: