From f48e872f93bb5b3e68ae7f0368c5224fd865bf66 Mon Sep 17 00:00:00 2001 From: Cool-Game-Dev Date: Wed, 13 Aug 2025 16:43:21 -0500 Subject: [PATCH] languages/nix: make nix fmt work outside the lsp Add a writeShellApplication wrapper to allow the flake formatter to stand on it's own. --- modules/plugins/languages/nix.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index ea1c6d00..ba3613dc 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -24,7 +24,7 @@ command = ["${cfg.format.package}/bin/nixfmt"]; }) (mkIf (cfg.format.type == "flake") { - command = ["${cfg.format.package}/bin/nix" "fmt"]; + command = ["${cfg.format.package}/bin/nix_fmt"]; }) ]; }; @@ -63,7 +63,11 @@ }; flake = { - package = pkgs.nix; + package = pkgs.writeShellApplication { + name = "nix_fmt"; + runtimeInputs = [pkgs.nix]; + text = "nix fmt"; + }; }; };