From 09f9a33620ea4354e6411a5d2a17a77a478c39b3 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sat, 5 Jul 2025 22:04:34 +0800 Subject: [PATCH] feat(git-hooks): add more git-hooks and linters --- .pre-commit-config.yaml | 2 +- modules/flake-parts/git-hooks.nix | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 33d4794..a0a4eaa 120000 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1 +1 @@ -/nix/store/qh06700fhmh52lwrzswkvbk3g06br5rm-pre-commit-config.json \ No newline at end of file +/nix/store/arpsghv46wxrv5lqb4rklmw0n4bda30r-pre-commit-config.json \ No newline at end of file diff --git a/modules/flake-parts/git-hooks.nix b/modules/flake-parts/git-hooks.nix index 8341bf7..a2bc1c0 100644 --- a/modules/flake-parts/git-hooks.nix +++ b/modules/flake-parts/git-hooks.nix @@ -1,10 +1,21 @@ { inputs, ... }: { - # TODO: add to readme imports = [ inputs.git-hooks.flakeModule ]; perSystem = psArgs: { pre-commit.settings.hooks = { - nixpkgs-fmt.enable = true; + # Nix Linters + deadnix.enable = true; + statix.enable = true; + nil.enable = true; + nixfmt-rfc-style.enable = true; + # Flake Health Checks + flake-checker.enable = true; + # Misc + mixed-line-endings.enable = true; + trim-trailing-whitespace.enable = true; + #TODO: figure out vale + #TODO: make nix develop work + #TODO: add nix flake check #TODO: add write-files }; make-shells.default.shellHook = psArgs.config.pre-commit.installationScript;