2024-12-12 14:41:43 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
2024-11-25 15:59:32 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
sources,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2024-10-23 13:56:47 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
services.django-apps.sites.bocal = {
|
|
|
|
source = "https://git.dgnum.eu/DGNum/www-bocal";
|
|
|
|
branch = "main";
|
|
|
|
domain = "bocal.webapps.dgnum.eu";
|
|
|
|
|
|
|
|
nginx = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
|
2024-11-25 15:59:32 +01:00
|
|
|
webHookSecret = config.age.secrets."webhook-bocal_token".path;
|
2024-10-23 13:56:47 +02:00
|
|
|
|
|
|
|
python = pkgs.python3.override {
|
|
|
|
packageOverrides = _: _: { inherit (nix-pkgs) django-cas-ng django-solo loadcredential; };
|
|
|
|
};
|
|
|
|
|
|
|
|
dependencies = ps: [
|
|
|
|
ps.django
|
|
|
|
ps.django-cas-ng
|
|
|
|
ps.django-markdownx
|
|
|
|
ps.django-solo
|
|
|
|
ps.markdown
|
|
|
|
ps.pillow
|
|
|
|
ps.loadcredential
|
|
|
|
];
|
|
|
|
|
|
|
|
credentials = {
|
2024-11-25 15:59:32 +01:00
|
|
|
SECRET_KEY = config.age.secrets."dj_bocal-secret_key_file".path;
|
2024-10-23 13:56:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
environment = {
|
|
|
|
DJANGO_SETTINGS_MODULE = "app.settings";
|
|
|
|
BOCAL_ALLOWED_HOSTS = [ "bocal.webapps.dgnum.eu" ];
|
|
|
|
BOCAL_RHOSTS_PATH = "/var/lib/django-apps/bocal/.rhosts";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|