From e02396a1c9f5f3ec6a4708d19a93b5e4e865c98d Mon Sep 17 00:00:00 2001 From: William Tan <1284324+Ninja3047@users.noreply.github.com> Date: Sun, 27 Apr 2025 14:56:33 -0400 Subject: [PATCH] use nixfmt-tree instead of calling the nixfmt-rfc-style directly (#2928) as of nix 2.25.0, `nix fmt` will not automatically recurse through nix files so `nixfmt-rfc-style` will format from stdin instead. see: https://github.com/NixOS/nix/pull/11438 this issue https://github.com/NixOS/nixfmt/issues/273 recommends that we use `nixfmt-tree` which calls `treefmt` in the backend with a minimal configuration for nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 94633f030..3f73da9b3 100644 --- a/flake.nix +++ b/flake.nix @@ -248,6 +248,6 @@ isLLDB = true; } ); - formatter = forAllSystems (system: pkgsBySystem.${system}.nixfmt-rfc-style); + formatter = forAllSystems (system: pkgsBySystem.${system}.nixfmt-tree); }; }