diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a6d52b..ef9bd81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,3 +4,11 @@ repos: hooks: - id: nixfmt-nix args: [--, --check] + - repo: local + hooks: + - id: statix + name: statix + entry: statix check + language: system + files: \.nix$ + pass_filenames: false diff --git a/flake.nix b/flake.nix index 1f2bc45..1649095 100644 --- a/flake.nix +++ b/flake.nix @@ -111,7 +111,10 @@ formatter = pkgs.nixfmt-tree; devShells.default = pkgs.mkShell { - packages = [ pkgs.pre-commit ]; + packages = [ + pkgs.pre-commit + pkgs.statix + ]; }; } ); diff --git a/statix.toml b/statix.toml new file mode 100644 index 0000000..3f02ae4 --- /dev/null +++ b/statix.toml @@ -0,0 +1 @@ +disabled = ["repeated_keys"]