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

This commit is contained in:
Shogo Takata 2025-03-27 19:50:57 +09:00
parent 693840c01b
commit 6db7c58cb4
No known key found for this signature in database

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;