infrastructure/machines/nixos/web03/django-apps/annuaire.nix

56 lines
1.1 KiB
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
2025-01-11 19:05:48 +01:00
{ config, ... }:
2024-10-21 19:41:59 +02:00
{
services.django-apps.sites.annuaire = {
source = "https://git.dgnum.eu/DGNum/annuaire-eleves";
branch = "main";
domain = "annuaire-ens.webapps.dgnum.eu";
nginx = {
enableACME = true;
forceSSL = true;
};
2024-11-25 15:59:32 +01:00
webHookSecret = config.age.secrets."webhook-annuaire_token".path;
2024-10-21 19:41:59 +02:00
2025-01-11 19:05:48 +01:00
overlays.nix-pkgs = [
"authens"
"loadcredential"
# Dependencies
"python-cas"
];
2024-10-21 19:41:59 +02:00
dependencies = ps: [
2025-01-11 19:05:48 +01:00
ps.authens
2024-10-21 19:41:59 +02:00
ps.django
ps.loadcredential
2025-01-11 19:05:48 +01:00
ps.pillow
2024-10-21 19:41:59 +02:00
ps.python-dateutil
];
credentials = {
2024-11-25 15:59:32 +01:00
SECRET_KEY = config.age.secrets."dj_annuaire-secret_key_file".path;
2024-10-21 19:41:59 +02:00
};
environment = {
ANNUAIRE_LDAP = {
SPI = {
PROTOCOL = "ldaps";
URL = "ldap.spi.ens.fr";
PORT = 636;
};
CRI = {
PROTOCOL = "ldaps";
URL = "annuaire.ens.fr";
PORT = 636;
};
};
};
};
}