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

50 lines
1,019 B
Nix
Raw Normal View History

2024-11-25 15:59:32 +01:00
{
pkgs,
sources,
config,
...
}:
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;
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;
};
environment = {
DJANGO_SETTINGS_MODULE = "app.settings";
BOCAL_ALLOWED_HOSTS = [ "bocal.webapps.dgnum.eu" ];
BOCAL_RHOSTS_PATH = "/var/lib/django-apps/bocal/.rhosts";
};
};
}