feat(dgsi): Update

This commit is contained in:
Tom Hubrecht 2025-01-25 19:42:36 +01:00
parent 11c7892f54
commit 137b629a0f
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
2 changed files with 35 additions and 23 deletions

View file

@ -14,28 +14,24 @@
let
inherit (lib) toLower;
python =
let
python3 = pkgs.python312;
nix-pkgs = import sources.nix-pkgs { inherit pkgs python3; };
in
python3.override {
packageOverrides = _: _: {
inherit (nix-pkgs)
django-allauth
django-allauth-cas
django-browser-reload
django-bulma-forms
django-sass-processor
django-sass-processor-dart-sass
django-unfold
pykanidm
python-cas
loadcredential
xlwt
;
};
python = pkgs.python312.override {
packageOverrides = (import "${sources.nix-pkgs}/overlay.nix").mkOverlay {
folder = "python-modules";
plist = [
"django-allauth"
"django-allauth-cas"
"django-browser-reload"
"django-bulma-forms"
"django-sass-processor"
"django-sass-processor-dart-sass"
"django-unfold"
"loadcredential"
"pykanidm"
"python-cas"
"xlwt"
];
};
};
pythonEnv = python.withPackages (
ps:
@ -79,6 +75,7 @@ let
export DGSI_KANIDM_AUTH_TOKEN="fake.token"
export DGSI_X509_KEY=""
export DGSI_X509_CERT=""
export DGSI_ARCHIVES_ROOT=""
'';
doBuild = false;
@ -157,6 +154,8 @@ in
DGSI_MEDIA_ROOT = "/var/lib/django-apps/dgsi/media";
DGSI_STATIC_ROOT = "${staticDrv}/static";
DGSI_ARCHIVES_ROOT = "/var/lib/django-apps/dgsi/archives";
DGSI_ARCHIVES_INTERNAL = "_archives";
DGSI_DATABASES = builtins.toJSON {
default = {
@ -187,6 +186,15 @@ in
};
mounts = [
{
where = "/run/django-apps/dgsi/archives";
what = "/var/lib/django-apps/dgsi/archives";
options = "bind";
after = [ "dj-dgsi.service" ];
partOf = [ "dj-dgsi.service" ];
upheldBy = [ "dj-dgsi.service" ];
}
{
where = "/run/django-apps/dgsi/media";
what = "/var/lib/django-apps/dgsi/media";
@ -220,6 +228,10 @@ in
"/".proxyPass = "http://unix:/run/django-apps/dgsi.sock";
"/static/".root = staticDrv;
"/media/".root = "/run/django-apps/dgsi";
"/_archives/".extraConfig = ''
internal;
alias /run/django-apps/dgsi/archives/;
'';
};
};
};

View file

@ -68,9 +68,9 @@
"url": "https://git.dgnum.eu/DGNum/dgsi.git"
},
"branch": "main",
"revision": "24f825c1dd34a3948cce7d39c19623ecf948ffa7",
"revision": "b859a72747648b7e2ce6384de02354bf3e6837cd",
"url": null,
"hash": "0b1pmfzckdbha9j7bvnkvqccf62dqyll8ip6mrdm90m0y8kdkzvg"
"hash": "1l4lw18lc5mj0lnh6rhd1i436azq476mr6a47p4gaxmy5qchpbaa"
},
"disko": {
"type": "GitRelease",