mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
direnv: Use ${getExe pkg} instead of ${pkg}/bin/pkg
This commit is contained in:
parent
67c4c05c29
commit
bc52cdd579
1 changed files with 6 additions and 4 deletions
|
@ -114,18 +114,18 @@ in {
|
|||
# Using mkAfter to make it more likely to appear after other
|
||||
# manipulations of the prompt.
|
||||
mkAfter ''
|
||||
eval "$(${cfg.package}/bin/direnv hook bash)"
|
||||
eval "$(${getExe cfg.package} hook bash)"
|
||||
'');
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${cfg.package}/bin/direnv hook zsh)"
|
||||
eval "$(${getExe cfg.package} hook zsh)"
|
||||
'';
|
||||
|
||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration (
|
||||
# Using mkAfter to make it more likely to appear after other
|
||||
# manipulations of the prompt.
|
||||
mkAfter ''
|
||||
${cfg.package}/bin/direnv hook fish | source
|
||||
${getExe cfg.package} hook fish | source
|
||||
'');
|
||||
|
||||
programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration (
|
||||
|
@ -135,7 +135,9 @@ in {
|
|||
$env.config = ($env.config? | default {})
|
||||
$env.config.hooks = ($env.config.hooks? | default {})
|
||||
$env.config.hooks.pre_prompt = ($env.config.hooks.pre_prompt? | default [] | append {||
|
||||
let direnv = (${cfg.package}/bin/direnv export json | from json | default {})
|
||||
let direnv = (${
|
||||
getExe cfg.package
|
||||
} export json | from json | default {})
|
||||
if ($direnv | is-empty) {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue