diff options
Diffstat (limited to '')
-rw-r--r-- | checks.nix | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/checks.nix b/checks.nix index 142ad1d..f9949e3 100644 --- a/checks.nix +++ b/checks.nix @@ -1,28 +1,34 @@ -{ - inputs, - system, -}: let +{ inputs, system }: +with inputs.nixpkgs.lib; +let pkgs = inputs.self.legacyPackages.${system}; -in { +in +{ preCommit = inputs.pre-commit.lib.${system}.run { src = builtins.path { name = "nixfiles"; path = ./.; }; hooks = { - alejandra.enable = true; - deadnix.enable = true; + nixfmt = { + enable = true; + package = pkgs.nixfmt; + }; + deadnix = { + enable = true; + settings.edit = true; + }; editorconfig-checker.enable = true; prettier = { enable = true; - files = "\\.css"; + types_or = mkForce [ "css" ]; }; shellcheck.enable = true; shfmt.enable = true; statix.enable = true; typos = { enable = true; - types = ["text"]; + types = [ "text" ]; pass_filenames = false; }; yamllint.enable = true; @@ -34,6 +40,5 @@ in { files = "(?x)^(modules/nixos/monitoring/rules/.*\.yaml)$"; }; }; - settings.deadnix.edit = true; }; } |