From 13d68e9ac05caccc1f81ce40612a8086421e1706 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Fri, 28 Mar 2025 13:31:30 +0900 Subject: [PATCH] helix: avoid IFD (#6714) Avoids IFD in the helix module which was introduced in #6575. The helix module fails to build when --no-allow-import-from-derivation is enabled. --- 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;