pay-respects: minor style cleanup
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
f24a755980
commit
a6c93262f3
1 changed files with 24 additions and 20 deletions
|
|
@ -6,8 +6,7 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.programs.pay-respects;
|
||||
payRespectsCmd = lib.getExe cfg.package;
|
||||
cfgOptions = lib.concatStringsSep " " cfg.options;
|
||||
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
in
|
||||
{
|
||||
|
|
@ -92,26 +91,31 @@ in
|
|||
}
|
||||
) cfg.rules;
|
||||
|
||||
programs = {
|
||||
bash.initExtra = lib.mkIf cfg.enableBashIntegration ''
|
||||
eval "$(${payRespectsCmd} bash ${cfgOptions})"
|
||||
'';
|
||||
programs =
|
||||
let
|
||||
payRespectsCmd = lib.getExe cfg.package;
|
||||
cfgOptions = lib.concatStringsSep " " cfg.options;
|
||||
in
|
||||
{
|
||||
bash.initExtra = lib.mkIf cfg.enableBashIntegration ''
|
||||
eval "$(${payRespectsCmd} bash ${cfgOptions})"
|
||||
'';
|
||||
|
||||
zsh.initContent = lib.mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${payRespectsCmd} zsh ${cfgOptions})"
|
||||
'';
|
||||
zsh.initContent = lib.mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${payRespectsCmd} zsh ${cfgOptions})"
|
||||
'';
|
||||
|
||||
fish.interactiveShellInit = lib.mkIf cfg.enableFishIntegration ''
|
||||
${payRespectsCmd} fish ${cfgOptions} | source
|
||||
'';
|
||||
fish.interactiveShellInit = lib.mkIf cfg.enableFishIntegration ''
|
||||
${payRespectsCmd} fish ${cfgOptions} | source
|
||||
'';
|
||||
|
||||
nushell.extraConfig = lib.mkIf cfg.enableNushellIntegration ''
|
||||
source ${
|
||||
pkgs.runCommand "pay-respects-nushell-config.nu" { } ''
|
||||
${payRespectsCmd} nushell ${cfgOptions} >> "$out"
|
||||
''
|
||||
}
|
||||
'';
|
||||
};
|
||||
nushell.extraConfig = lib.mkIf cfg.enableNushellIntegration ''
|
||||
source ${
|
||||
pkgs.runCommand "pay-respects-nushell-config.nu" { } ''
|
||||
${payRespectsCmd} nushell ${cfgOptions} >> "$out"
|
||||
''
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue