dgsi/default.nix

70 lines
1.3 KiB
Nix
Raw Normal View History

2024-04-05 11:53:49 +02:00
{
sources ? import ./npins,
pkgs ? import sources.nixpkgs { },
}:
let
check = (import sources.git-hooks).run {
src = ./.;
hooks = {
# JS hooks
eslint.enable = true;
# Python hooks
ruff.enable = true;
black.enable = true;
isort.enable = true;
# Nix Hooks
statix.enable = true;
deadnix.enable = true;
# Misc Hooks
commitizen.enable = true;
};
};
in
{
2024-05-21 21:19:28 +02:00
devShell = pkgs.mkShell {
2024-05-26 22:09:49 +02:00
name = "dgsi.dev";
2024-04-05 11:53:49 +02:00
packages = [
pkgs.jq
2024-05-26 22:09:49 +02:00
pkgs.dart-sass
2024-04-05 11:53:49 +02:00
2024-05-21 21:19:28 +02:00
# Python dependencies
2024-05-26 22:09:49 +02:00
(pkgs.python3.withPackages (
ps:
[
ps.daphne
ps.django
ps.django-allauth
ps.django-compressor
2024-05-27 09:05:29 +02:00
ps.django-debug-toolbar
2024-05-26 22:09:49 +02:00
ps.django-types
ps.loadcredential
]
++ (builtins.map (p: ps.callPackage ./pkgs/${p} { }) [
"django-browser-reload"
2024-05-28 08:28:54 +02:00
"django-bulma-forms"
2024-05-26 22:09:49 +02:00
"django-sass-processor"
"django-sass-processor-dart-sass"
"pykanidm"
])
))
2024-04-05 11:53:49 +02:00
] ++ check.enabledPackages;
2024-05-26 22:09:49 +02:00
env = {
CREDENTIALS_DIRECTORY = builtins.toString ./.credentials;
DGSI_DEBUG = "true";
DGSI_STATIC_ROOT = builtins.toString ./.static;
};
2024-04-05 11:53:49 +02:00
shellHook = ''
${check.shellHook}
'';
};
}