2024-12-19 20:35:17 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
sources,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
services.django-apps.sites.ernestophone = {
|
|
|
|
source = "https://git.dgnum.eu/DGNum/ernestophone.ens.fr";
|
|
|
|
branch = "update";
|
2024-12-20 16:45:53 +01:00
|
|
|
domain = "ernestophone.ens.fr";
|
2024-12-19 20:35:17 +01:00
|
|
|
|
|
|
|
nginx = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations = {
|
|
|
|
"/media/trombonoscope/".root = "/run/django-apps/ernestophone/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
serveMedia = false;
|
|
|
|
|
|
|
|
webHookSecret = config.age.secrets."webhook-ernestophone_token".path;
|
|
|
|
|
|
|
|
python = pkgs.python3.override {
|
|
|
|
packageOverrides = _: _: {
|
|
|
|
inherit (nix-pkgs)
|
|
|
|
django-avatar
|
|
|
|
django-cas-ng
|
|
|
|
django-solo
|
|
|
|
loadcredential
|
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
dependencies = ps: [
|
|
|
|
ps.django
|
|
|
|
ps.django-avatar
|
|
|
|
ps.django-colorful
|
|
|
|
ps.gunicorn
|
|
|
|
ps.pillow
|
|
|
|
ps.loadcredential
|
|
|
|
];
|
|
|
|
|
|
|
|
application.module = "Ernestophone";
|
|
|
|
|
|
|
|
credentials = {
|
|
|
|
SECRET_KEY = config.age.secrets."dj_ernestophone-secret_key_file".path;
|
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
|
|
|
DJANGO_SETTINGS_MODULE = "Ernestophone.settings";
|
2024-12-20 16:45:53 +01:00
|
|
|
ERNESTOPHONE_ALLOWED_HOSTS = [ "ernestophone.ens.fr" ];
|
2024-12-19 20:35:17 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|