1
0
Fork 0
nixos-config/test.nix

18 lines
553 B
Nix
Raw Normal View History

2021-05-18 14:28:31 +00:00
let
2022-11-22 15:25:54 +00:00
commit = (builtins.fromJSON (builtins.readFile ./nix/sources.json))."pre-commit-hooks.nix".rev;
nix-pre-commit-hooks = builtins.getFlake "github:cachix/pre-commit-hooks.nix/${commit}";
2022-03-08 01:42:46 +00:00
in {
2022-11-22 15:25:54 +00:00
pre-commit-check = nix-pre-commit-hooks.lib.x86_64-linux.run {
2021-05-18 14:28:31 +00:00
src = ./.;
hooks = {
hlint.enable = true;
2022-03-08 01:42:46 +00:00
alejandra.enable = true;
2022-03-08 04:53:07 +00:00
nix-linter.enable = false; # Too many false positives for now
2022-03-08 02:19:09 +00:00
statix.enable = true;
2021-05-18 14:28:31 +00:00
fourmolu.enable = true;
2022-03-08 01:42:46 +00:00
cabal-fmt.enable = true;
shellcheck.enable = true;
2021-05-18 14:28:31 +00:00
};
};
}