From 80fece6fa8febbed3d6cde9725469ed5f27b17a3 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 8 Feb 2026 21:35:54 +0300 Subject: [PATCH] nix: make default formatter a multi-file wrapper Signed-off-by: NotAShelf Change-Id: I2cec885c77bdb5cc5dc9ca8bc7a25e2a6a6a6964 --- flake.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 222949c..ccdcca7 100644 --- a/flake.nix +++ b/flake.nix @@ -94,6 +94,7 @@ features = pkgs.callPackage ./nix/tests/features.nix {inherit self;}; webhooks = pkgs.callPackage ./nix/tests/webhooks.nix {inherit self;}; e2e = pkgs.callPackage ./nix/tests/e2e.nix {inherit self;}; + declarative = pkgs.callPackage ./nix/tests/declarative.nix {inherit self;}; }); devShells = forAllSystems (system: let @@ -115,6 +116,20 @@ }; }); - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + formatter = forAllSystems (system: let + pkgs = nixpkgs.legacyPackages.${system}; + in + pkgs.writeShellApplication { + name = "nix3-fmt-wrapper"; + + runtimeInputs = [ + pkgs.alejandra + pkgs.fd + ]; + + text = '' + fd "$@" -t f -e nix -x alejandra -q '{}' + ''; + }); }; }