summaryrefslogtreecommitdiff
path: root/checks.nix
blob: 86cb452a2f56190a5f5099786715746614d39bae (plain)
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
inputs: system: pkgs: {
  preCommit = inputs.git-hooks.lib.${system}.run {
    src = builtins.path {
      name = "nixfiles";
      path = ./.;
    };
    hooks = {
      nixfmt = {
        enable = true;
        package = pkgs.nixfmt;
      };
      promtool = {
        enable = true;
        name = "promtool";
        description = "Check Prometheus rules";
        entry = "${pkgs.prometheus.cli}/bin/promtool check rules";
        files = "(?x)^(modules/monitoring/rules/.*\.yaml)$";
      };
      deadnix.enable = true;
      editorconfig-checker.enable = true;
      prettier.enable = true;
      shellcheck.enable = true;
      shfmt.enable = true;
      statix.enable = true;
      yamllint.enable = true;
    };
  };
}