infrastructure/machines/web03/django-apps/interludes.nix
Tom Hubrecht 2ffd7732ba
All checks were successful
Build all the nodes / bridge01 (push) Successful in 1m19s
Build all the nodes / geo01 (push) Successful in 1m18s
Build all the nodes / geo02 (push) Successful in 1m22s
Build all the nodes / storage01 (push) Successful in 1m28s
Build all the nodes / rescue01 (push) Successful in 1m32s
Build all the nodes / compute01 (push) Successful in 1m45s
Run pre-commit on all files / check (push) Successful in 24s
Build all the nodes / web02 (push) Successful in 1m25s
Build all the nodes / web03 (push) Successful in 1m24s
Build all the nodes / vault01 (push) Successful in 1m36s
Build all the nodes / web01 (push) Successful in 1m57s
feat(django-apps/interludes): Allow base webapps domain
2024-11-12 15:08:17 +01:00

65 lines
1.5 KiB
Nix

{
config,
pkgs,
sources,
...
}:
let
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
in
{
services.django-apps.sites.interludes = {
source = "https://git.eleves.ens.fr/dlesbre/site-interludes";
branch = "master";
domain = "interludes.ens.fr";
nginx = {
enableACME = true;
forceSSL = true;
serverAliases = [ "interludes.webapps.dgnum.eu" ];
};
webHookSecret = builtins.toFile "insecure-secret" "T5hNeDraMivRZLUkrekv&QeM";
application = {
type = "wsgi";
module = "interludes";
};
dbType = "sqlite";
python = pkgs.python3.override {
packageOverrides = _: _: { inherit (nix-pkgs) python-cas loadcredential; };
};
django = ps: ps.django_4;
dependencies = ps: [
ps.loadcredential
ps.python-ldap
ps.python-cas
];
credentials = {
SECRET_KEY = config.age.secrets."dj_interludes-secret_key_file".path;
EMAIL_HOST_PASSWORD = config.age.secrets."dj_interludes-email_host_password_file".path;
};
environment = {
INTERLUDES_ALLOWED_HOSTS = [
"interludes.ens.fr"
"interludes.webapps.dgnum.eu"
];
# E-mail configuration
INTERLUDES_SERVER_EMAIL = "noreply-interludes-admin@ens.fr";
INTERLUDES_DEFAULT_FROM_EMAIL = "noreply-interludes@ens.fr";
INTERLUDES_EMAIL_HOST = "clipper.ens.fr";
INTERLUDES_EMAIL_PORT = 465;
INTERLUDES_EMAIL_HOST_USER = "interludes";
INTERLUDES_DEBUG = false;
};
};
}