70 lines
1.3 KiB
Nix
70 lines
1.3 KiB
Nix
{
|
|
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
|
|
|
|
{
|
|
devShell = pkgs.mkShell {
|
|
name = "dgsi.dev";
|
|
|
|
packages = [
|
|
pkgs.jq
|
|
pkgs.dart-sass
|
|
|
|
# Python dependencies
|
|
(pkgs.python3.withPackages (
|
|
ps:
|
|
[
|
|
ps.daphne
|
|
ps.django
|
|
ps.django-allauth
|
|
ps.django-compressor
|
|
ps.django-debug-toolbar
|
|
ps.django-stubs
|
|
ps.loadcredential
|
|
]
|
|
++ (builtins.map (p: ps.callPackage ./pkgs/${p} { }) [
|
|
"django-browser-reload"
|
|
"django-bulma-forms"
|
|
"django-sass-processor"
|
|
"django-sass-processor-dart-sass"
|
|
"pykanidm"
|
|
])
|
|
))
|
|
] ++ check.enabledPackages;
|
|
|
|
env = {
|
|
CREDENTIALS_DIRECTORY = builtins.toString ./.credentials;
|
|
DGSI_DEBUG = "true";
|
|
DGSI_STATIC_ROOT = builtins.toString ./.static;
|
|
DGSI_KANIDM_CLIENT = "dgsi_test";
|
|
};
|
|
|
|
shellHook = ''
|
|
${check.shellHook}
|
|
'';
|
|
};
|
|
}
|