2023-03-08 00:48:11 +01:00
|
|
|
{ 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";
|
2023-04-05 09:36:42 +02:00
|
|
|
rev = "3c22af193327cd13e9cdfa0463e2b34bda840756";
|
|
|
|
hash = "sha256-8+jA/vn1SUpceQTshgsi7Ea97HAmSeCGZdFbopGECck=";
|
2023-03-08 00:48:11 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|