{ pkgs, lib, config, ... }: let assets = import ./mkAssets.nix { inherit pkgs; app = "hackens_orga"; settings = config.services.django.hackens_orga.settings; source = pkgs.fetchgit { url = "https://git.rz.ens.wtf/HackENS/hackens-orga.git"; rev = "75fe83a41f"; hash = "sha256-cfUjSfZrsMpGRO3HOWOk6zdc9+e+ZaJLiJQ5OpIKxos="; }; }; in { imports = [ ./module.nix ]; services.nginx = { enable = true; virtualHosts."new.hackens.org" = { locations = { "/orga" = { proxyPass = "http://localhost:51666/orga"; extraConfig = '' proxy_set_header SCRIPT_NAME /orga; ''; }; "/static".root = assets.static-assets; }; }; }; services.django.hackens_orga = { enable = true; assets = assets; settings = { HACKENS_ORGA_DEBUG = "0"; HACKENS_ORGA_ALLOWED_HOSTS = [ "new.hackens.org" ]; HACKENS_ORGA_SECRET_KEY._file = config.age.secrets.django.path; HACKENS_ORGA_DB_FILE = "/var/lib/hackens-orga/db.sqlite3"; }; }; }