summaryrefslogtreecommitdiff
path: root/checks.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-03-31 21:29:27 +0300
committerAzat Bahawi <azat@bahawi.net>2024-03-31 21:29:27 +0300
commit9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 (patch)
treef28beec29deeea36038615a8fb98a810891940b5 /checks.nix
parent4ad0c3afc1f6caf0c3f05f99a15b22178f2c190b (diff)
2024-03-31
Diffstat (limited to 'checks.nix')
-rw-r--r--checks.nix25
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;
};
}