feat(nix): Add static directory used locally

This commit is contained in:
Tom Hubrecht 2024-07-02 14:54:29 +02:00
parent 35c3c12a83
commit 10cfb987c1
2 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View file

@ -65,3 +65,4 @@ venv
db.sqlite3 db.sqlite3
public/ public/
.direnv .direnv
.static

View file

@ -8,8 +8,13 @@
name = "cas-eleves.dev"; name = "cas-eleves.dev";
packages = [ packages = [
(pkgs.python3.withPackages (ps: [ # Python 3.12 is required to have the correct SSL options for connecting with the legacy server
(pkgs.python312.withPackages (ps: [
ps.django ps.django
ps.ipython
ps.ldap3
# Local packages
(ps.callPackage ./nix/django-cas-server { }) (ps.callPackage ./nix/django-cas-server { })
(ps.callPackage ./nix/loadcredential { }) (ps.callPackage ./nix/loadcredential { })
])) ]))
@ -18,6 +23,13 @@
env = { env = {
CREDENTIALS_DIRECTORY = builtins.toString ./.credentials; CREDENTIALS_DIRECTORY = builtins.toString ./.credentials;
CE_DEBUG = true; CE_DEBUG = true;
CE_STATIC_ROOT = builtins.toString ./.static;
}; };
shellHook = ''
if [ ! -d .static ]; then
mkdir .static
fi
'';
}; };
} }