66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
sources,
|
|
...
|
|
}:
|
|
|
|
let
|
|
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
|
|
in
|
|
|
|
{
|
|
services.webhook.extraArgs = [ "-debug" ];
|
|
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 = config.age.secrets."webhook-interludes_token".path;
|
|
|
|
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;
|
|
};
|
|
};
|
|
}
|