-
Notifications
You must be signed in to change notification settings - Fork 1
/
checks.nix
39 lines (37 loc) · 924 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
37
38
39
{ 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 = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
shellcheck.enable = true;
statix.enable = true;
gitleaks = {
enable = true;
name = "gitleaks";
entry = "${pkgs.gitleaks}/bin/gitleaks protect --verbose --redact --staged";
pass_filenames = false;
};
};
};
};
};
}