diff --git a/machines/web03/django-apps/bocal.nix b/machines/web03/django-apps/bocal.nix new file mode 100644 index 0000000..36816be --- /dev/null +++ b/machines/web03/django-apps/bocal.nix @@ -0,0 +1,44 @@ +{ pkgs, sources, ... }: + +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; + }; + + webHookSecret = builtins.toFile "insecure-secret" "T5hNeDraMivRZLUkrekv&QeM"; + + 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 = { + SECRET_KEY = builtins.toFile "insecure-key" "insecure-key"; + }; + + environment = { + DJANGO_SETTINGS_MODULE = "app.settings"; + BOCAL_ALLOWED_HOSTS = [ "bocal.webapps.dgnum.eu" ]; + BOCAL_RHOSTS_PATH = "/var/lib/django-apps/bocal/.rhosts"; + }; + }; +} diff --git a/machines/web03/django-apps/default.nix b/machines/web03/django-apps/default.nix index 5c0760c..1df5875 100644 --- a/machines/web03/django-apps/default.nix +++ b/machines/web03/django-apps/default.nix @@ -1,6 +1,7 @@ { imports = [ ./annuaire.nix + ./bocal.nix ./gestiojeux.nix ./wikiens.nix ]; diff --git a/npins/sources.json b/npins/sources.json index 0b8561f..8430616 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -226,9 +226,9 @@ "url": "https://git.hubrecht.ovh/hubrecht/nix-pkgs" }, "branch": "main", - "revision": "6f56463c0034d4162dabb98ee8e70d6c43214ac0", + "revision": "e3fac77b062c9fe98dc1b5a367b0a8e70cde9624", "url": null, - "hash": "0dqm2n88f0yl63wacizwpjrcv51arz5z31nhwbjcbyjxrwiwxamq" + "hash": "12xqh19mv8zgvyrh4vfnc95acf45x81g398pyqsd1xy1l7030r7i" }, "nixos-24.05": { "type": "Channel",