1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-31 04:04:32 +00:00

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.
This commit is contained in:
Shogo Takata 2025-03-28 13:31:30 +09:00 committed by GitHub
parent b14a70c40f
commit 13d68e9ac0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;