-
Notifications
You must be signed in to change notification settings - Fork 1
/
checks.nix
36 lines (34 loc) · 854 Bytes
/
checks.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ inputs, ... }:
{
imports = [ inputs.nix-pre-commit-hooks.flakeModule ];
perSystem =
{ pkgs, ... }:
{
pre-commit = {
check.enable = true;
settings = {
excludes = [
"systems/.*/.*/hardware-configuration.nix"
".direnv/.*"
];
hooks = {
deadnix = {
enable = true;
settings = {
edit = true;
};
};
nixfmt-rfc-style.enable = true;
shellcheck.enable = true;
statix.enable = true;
gitleaks = {
enable = true;
name = "gitleaks";
entry = "${pkgs.gitleaks}/bin/gitleaks protect --verbose --redact --staged";
pass_filenames = false;
};
};
};
};
};
}