feat: init
This commit is contained in:
commit
a6e0b0a803
29 changed files with 911 additions and 0 deletions
71
provisioning/shell.nix
Normal file
71
provisioning/shell.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
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;
|
||||
rfc101 = {
|
||||
enable = true;
|
||||
|
||||
name = "RFC-101 formatting";
|
||||
entry = "${pkgs.lib.getExe pkgs.nixfmt-rfc-style}";
|
||||
files = "\\.nix$";
|
||||
};
|
||||
|
||||
# Misc Hooks
|
||||
commitizen.enable = true;
|
||||
};
|
||||
};
|
||||
python = pkgs.python3.override {
|
||||
packageOverrides = self: _: {
|
||||
python-cas = self.callPackage ./python-cas { };
|
||||
django-allauth-cas = self.callPackage ./django-allauth-cas { };
|
||||
django-browser-reload = self.callPackage ./django-browser-reload { };
|
||||
};
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.jq
|
||||
pkgs.dart-sass
|
||||
|
||||
(python.withPackages (
|
||||
ps:
|
||||
[
|
||||
ps.django
|
||||
ps.gunicorn
|
||||
ps.django-browser-reload
|
||||
ps.django-types
|
||||
ps.django-allauth-cas
|
||||
ps.django-allauth
|
||||
|
||||
#Debug
|
||||
ps.black
|
||||
ps.isort
|
||||
]
|
||||
++ ps.django-allauth.optional-dependencies.socialaccount
|
||||
))
|
||||
|
||||
pkgs.djlint
|
||||
]
|
||||
++ check.enabledPackages;
|
||||
shellHook = ''
|
||||
${check.shellHook}
|
||||
'';
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue