From 6db7c58cb44a586327ef500658f8d7b5c2004424 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Thu, 27 Mar 2025 19:50:57 +0900 Subject: [PATCH] helix: avoid IFD --- modules/programs/helix.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/programs/helix.nix b/modules/programs/helix.nix index 6529e6c22..3119a06d4 100644 --- a/modules/programs/helix.nix +++ b/modules/programs/helix.nix @@ -212,9 +212,13 @@ in { xdg.configFile = let settings = { "helix/config.toml" = mkIf (cfg.settings != { }) { - text = - builtins.readFile (tomlFormat.generate "helix-config" cfg.settings) - + "\n" + cfg.extraConfig; + source = let + configFile = tomlFormat.generate "config.toml" cfg.settings; + extraConfigFile = + pkgs.writeText "extra-config.toml" ("\n" + cfg.extraConfig); + in pkgs.runCommand "helix-config.toml" { } '' + cat ${configFile} ${extraConfigFile} >> $out + ''; }; "helix/languages.toml" = mkIf (cfg.languages != { }) { source = tomlFormat.generate "helix-languages-config" cfg.languages;