feat(git-hooks): add more git-hooks and linters

This commit is contained in:
Mohammad Rafiq 2025-07-05 22:04:34 +08:00
parent 2599d2e49c
commit 09f9a33620
No known key found for this signature in database
2 changed files with 14 additions and 3 deletions

View file

@ -1 +1 @@
/nix/store/qh06700fhmh52lwrzswkvbk3g06br5rm-pre-commit-config.json /nix/store/arpsghv46wxrv5lqb4rklmw0n4bda30r-pre-commit-config.json

View file

@ -1,10 +1,21 @@
{ inputs, ... }: { inputs, ... }:
{ {
# TODO: add to readme
imports = [ inputs.git-hooks.flakeModule ]; imports = [ inputs.git-hooks.flakeModule ];
perSystem = psArgs: { perSystem = psArgs: {
pre-commit.settings.hooks = { pre-commit.settings.hooks = {
nixpkgs-fmt.enable = true; # Nix Linters
deadnix.enable = true;
statix.enable = true;
nil.enable = true;
nixfmt-rfc-style.enable = true;
# Flake Health Checks
flake-checker.enable = true;
# Misc
mixed-line-endings.enable = true;
trim-trailing-whitespace.enable = true;
#TODO: figure out vale
#TODO: make nix develop work
#TODO: add nix flake check
#TODO: add write-files #TODO: add write-files
}; };
make-shells.default.shellHook = psArgs.config.pre-commit.installationScript; make-shells.default.shellHook = psArgs.config.pre-commit.installationScript;