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:
parent
693840c01b
commit
6db7c58cb4
1 changed files with 7 additions and 3 deletions
|
@ -212,9 +212,13 @@ in {
|
||||||
xdg.configFile = let
|
xdg.configFile = let
|
||||||
settings = {
|
settings = {
|
||||||
"helix/config.toml" = mkIf (cfg.settings != { }) {
|
"helix/config.toml" = mkIf (cfg.settings != { }) {
|
||||||
text =
|
source = let
|
||||||
builtins.readFile (tomlFormat.generate "helix-config" cfg.settings)
|
configFile = tomlFormat.generate "config.toml" cfg.settings;
|
||||||
+ "\n" + cfg.extraConfig;
|
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 != { }) {
|
"helix/languages.toml" = mkIf (cfg.languages != { }) {
|
||||||
source = tomlFormat.generate "helix-languages-config" cfg.languages;
|
source = tomlFormat.generate "helix-languages-config" cfg.languages;
|
||||||
|
|
Loading…
Add table
Reference in a new issue