From a54ee8ad64c91b587c3460126bad25a441c1118c Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 4 Jun 2024 16:57:20 +0100 Subject: [PATCH] flake-modules: explicitly set the same nixfmt for treefmt + pre-commit --- flake-modules/dev/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/flake-modules/dev/default.nix b/flake-modules/dev/default.nix index c3f1a5aa0..3fe66798c 100644 --- a/flake-modules/dev/default.nix +++ b/flake-modules/dev/default.nix @@ -8,12 +8,18 @@ perSystem = { pkgs, config, ... }: + let + fmt = pkgs.nixfmt-rfc-style; + in { treefmt.config = { projectRootFile = "flake.nix"; programs = { - nixfmt-rfc-style.enable = true; + nixfmt = { + enable = true; + package = fmt; + }; statix.enable = true; }; }; @@ -21,8 +27,8 @@ pre-commit = { settings.hooks = { nixfmt = { - package = pkgs.nixfmt-rfc-style; enable = true; + package = fmt; }; statix = { enable = true;