flake: Run statix hook only on staged files

This commit is contained in:
Erwin Boskma 2024-01-29 10:19:05 +01:00
parent 29e3f7d597
commit cc7230d92f
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk

View file

@ -202,14 +202,17 @@
}; };
perSystem = { inputs', pkgs, config, ... }: { perSystem = { inputs', pkgs, config, lib, ... }: {
pre-commit = { pre-commit = {
settings = { settings = {
hooks = { hooks = {
nixpkgs-fmt.enable = true; nixpkgs-fmt.enable = true;
deadnix.enable = true; deadnix.enable = true;
statix.enable = true; statix = {
enable = true;
pass_filenames = lib.mkForce true;
};
black.enable = true; black.enable = true;
shellcheck = { shellcheck = {
enable = true; enable = true;