From e6cad243de3af84684881d1153681bdc650fedd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sun, 22 Feb 2026 12:02:26 +0100 Subject: [PATCH] feat: setup statix linter --- .pre-commit-config.yaml | 8 ++++++++ flake.nix | 5 ++++- statix.toml | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 statix.toml 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"]