forked from DGNum/infrastructure
Tom Hubrecht
88d9b8c3e3
Signed-off-by: Tom Hubrecht <tom.hubrecht@dgnum.eu> Acked-by: Ryan Lahfa <ryan.lahfa@dgnum.eu> Acked-by: Maurice Debray <maurice.debray@dgnum.eu> Acked-by: Lubin Bailly <lubin.bailly@dgnum.eu> Acked-by: Jean-Marc Gailis <jean-marc.gailis@dgnum.eu> as the legal authority, at the time of writing, in DGNum. Acked-by: Elias Coppens <elias.coppens@dgnum.eu> as a member, at the time of writing, of the DGNum executive counsel.
70 lines
1.6 KiB
Nix
70 lines
1.6 KiB
Nix
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
#
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
{
|
|
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;
|
|
};
|
|
};
|
|
}
|