mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user