hackens-org-configurations/machines/hackens-org/orga/default.nix

43 lines
1 KiB
Nix
Raw Normal View History

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-09-27 14:33:26 +02:00
rev = "75fe83a41f";
hash = "sha256-cfUjSfZrsMpGRO3HOWOk6zdc9+e+ZaJLiJQ5OpIKxos=";
2023-03-08 00:48:11 +01:00
};
};
in
{
imports = [
./module.nix
];
services.nginx = {
enable = true;
2023-12-20 19:53:09 +01:00
virtualHosts."hackens.org" = {
2023-03-08 00:48:11 +01:00
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";
2023-12-20 19:53:09 +01:00
HACKENS_ORGA_ALLOWED_HOSTS = [ "hackens.org" ];
2023-03-08 00:48:11 +01:00
HACKENS_ORGA_SECRET_KEY._file = config.age.secrets.django.path;
HACKENS_ORGA_DB_FILE = "/var/lib/hackens-orga/db.sqlite3";
};
};
}