mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
treewide: zsh initExtra -> initContent
Migrating in tree usages of zsh initExtra to initContent before deprecating.
This commit is contained in:
parent
296ddc6462
commit
10deb9d043
39 changed files with 59 additions and 57 deletions
|
@ -45,7 +45,7 @@
|
|||
})
|
||||
|
||||
(lib.mkIf config.programs.zsh.enableVteIntegration {
|
||||
programs.zsh.initExtra = ''
|
||||
programs.zsh.initContent = ''
|
||||
. ${pkgs.vte}/etc/profile.d/vte.sh
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -114,7 +114,7 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
if [[ $options[zle] = on ]]; then
|
||||
eval "$(${lib.getExe cfg.package} init zsh ${flagsStr})"
|
||||
fi
|
||||
|
|
|
@ -30,7 +30,7 @@ in {
|
|||
. ${package}/share/autojump/autojump.bash
|
||||
'');
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
. ${package}/share/autojump/autojump.zsh
|
||||
'';
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ in {
|
|||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration (shellInit "bash");
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration (shellInit "zsh");
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration (shellInit "zsh");
|
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration (shellInit "fish");
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ in {
|
|||
source <(${bin} _carapace bash)
|
||||
'';
|
||||
|
||||
zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
source <(${bin} _carapace zsh)
|
||||
'';
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
programs.bash.initExtra = shInit "command_not_found_handle";
|
||||
programs.zsh.initExtra = shInit "command_not_found_handler";
|
||||
programs.zsh.initContent = shInit "command_not_found_handler";
|
||||
|
||||
home.packages = [ commandNotFound ];
|
||||
};
|
||||
|
|
|
@ -121,7 +121,7 @@ in {
|
|||
eval "$(${getExe cfg.package} hook bash)"
|
||||
'');
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${getExe cfg.package} hook zsh)"
|
||||
'';
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
if [[ $TERM != "dumb" ]]; then
|
||||
eval "$(${ewwCmd} shell-completions --shell zsh)"
|
||||
fi
|
||||
|
|
|
@ -195,7 +195,7 @@ in {
|
|||
# Note, since fzf unconditionally binds C-r we use `mkOrder` to make the
|
||||
# initialization show up a bit earlier. This is to make initialization of
|
||||
# other history managers, like mcfly or atuin, take precedence.
|
||||
programs.zsh.initExtra =
|
||||
programs.zsh.initContent =
|
||||
mkIf cfg.enableZshIntegration (mkOrder 200 zshIntegration);
|
||||
|
||||
programs.fish.interactiveShellInit =
|
||||
|
|
|
@ -194,7 +194,7 @@ in {
|
|||
})
|
||||
|
||||
(lib.mkIf cfg.enableZshIntegration {
|
||||
programs.zsh.initExtra = ''
|
||||
programs.zsh.initContent = ''
|
||||
if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
|
||||
source "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
|
||||
fi
|
||||
|
|
|
@ -33,7 +33,7 @@ in {
|
|||
optionalString cfg.enableBashIntegration (initScript "bash");
|
||||
programs.fish.interactiveShellInit =
|
||||
optionalString cfg.enableFishIntegration (initScript "fish");
|
||||
programs.zsh.initExtra =
|
||||
programs.zsh.initContent =
|
||||
optionalString cfg.enableZshIntegration (initScript "zsh");
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = [ package ];
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
function assume() {
|
||||
export GRANTED_ALIAS_CONFIGURED="true"
|
||||
source ${package}/bin/assume "$@"
|
||||
|
|
|
@ -30,7 +30,7 @@ in {
|
|||
eval "$(${cfg.package}/bin/hstr --show-configuration)"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${cfg.package}/bin/hstr --show-zsh-configuration)"
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -93,7 +93,7 @@ in {
|
|||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
SHELL=fish eval (${shellCommand})
|
||||
'';
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(SHELL=zsh ${shellCommand})"
|
||||
'';
|
||||
programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration ''
|
||||
|
|
|
@ -282,7 +282,7 @@ in {
|
|||
programs.fish.interactiveShellInit =
|
||||
mkIf cfg.shellIntegration.enableFishIntegration shellIntegrationInit.fish;
|
||||
|
||||
programs.zsh.initExtra =
|
||||
programs.zsh.initContent =
|
||||
mkIf cfg.shellIntegration.enableZshIntegration shellIntegrationInit.zsh;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ in {
|
|||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration bashIntegration;
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration zshIntegration;
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration zshIntegration;
|
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration fishIntegration;
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ in {
|
|||
eval "$(${getExe cfg.package} activate bash)"
|
||||
'';
|
||||
|
||||
zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${getExe cfg.package} activate zsh)"
|
||||
'';
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ in {
|
|||
source <(${cfg.package}/bin/mods completion bash)
|
||||
'');
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration (mkOrder 200 ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration (mkOrder 200 ''
|
||||
source <(${cfg.package}/bin/mods completion zsh)
|
||||
'');
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
if [[ $options[zle] = on ]]; then
|
||||
eval "$(${cfg.package}/bin/navi widget zsh)"
|
||||
fi
|
||||
|
|
|
@ -41,7 +41,7 @@ in {
|
|||
source ${cfg.package}/etc/profile.d/command-not-found.sh
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = lib.mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = lib.mkIf cfg.enableZshIntegration ''
|
||||
source ${cfg.package}/etc/profile.d/command-not-found.sh
|
||||
'';
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
${cfg.package}/bin/nix-your-shell zsh | source /dev/stdin
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -71,7 +71,7 @@ in {
|
|||
eval "$(${cfg.package}/bin/oh-my-posh init bash ${configArgument})"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${cfg.package}/bin/oh-my-posh init zsh ${configArgument})"
|
||||
'';
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ in {
|
|||
eval "$(${cfg.package}/bin/opam env --shell=bash)"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${cfg.package}/bin/opam env --shell=zsh)"
|
||||
'';
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ in {
|
|||
''}
|
||||
'';
|
||||
|
||||
zsh.initExtra = ''
|
||||
zsh.initContent = ''
|
||||
${optionalString cfg.enableZshIntegration ''
|
||||
eval "$(${payRespectsCmd} zsh --alias)"
|
||||
''}
|
||||
|
|
|
@ -29,7 +29,7 @@ in {
|
|||
eval "$(${pkgs.pazi}/bin/pazi init bash)"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${pkgs.pazi}/bin/pazi init zsh)"
|
||||
'';
|
||||
|
||||
|
|
|
@ -142,27 +142,28 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf (cfg.enable && config.programs.zsh.enable) ''
|
||||
function powerline_precmd() {
|
||||
${
|
||||
if evalMode then "eval " else "PS1="
|
||||
}"$(${pkgs.powerline-go}/bin/powerline-go -error $? -shell zsh${commandLineArguments})"
|
||||
${cfg.extraUpdatePS1}
|
||||
}
|
||||
programs.zsh.initContent =
|
||||
mkIf (cfg.enable && config.programs.zsh.enable) ''
|
||||
function powerline_precmd() {
|
||||
${
|
||||
if evalMode then "eval " else "PS1="
|
||||
}"$(${pkgs.powerline-go}/bin/powerline-go -error $? -shell zsh${commandLineArguments})"
|
||||
${cfg.extraUpdatePS1}
|
||||
}
|
||||
|
||||
function install_powerline_precmd() {
|
||||
for s in "$\{precmd_functions[@]}"; do
|
||||
if [ "$s" = "powerline_precmd" ]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
precmd_functions+=(powerline_precmd)
|
||||
}
|
||||
function install_powerline_precmd() {
|
||||
for s in "$\{precmd_functions[@]}"; do
|
||||
if [ "$s" = "powerline_precmd" ]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
precmd_functions+=(powerline_precmd)
|
||||
}
|
||||
|
||||
if [ "$TERM" != "linux" ]; then
|
||||
install_powerline_precmd
|
||||
fi
|
||||
'';
|
||||
if [ "$TERM" != "linux" ]; then
|
||||
install_powerline_precmd
|
||||
fi
|
||||
'';
|
||||
|
||||
# https://github.com/justjanne/powerline-go#fish
|
||||
programs.fish.interactiveShellInit =
|
||||
|
|
|
@ -54,7 +54,7 @@ in {
|
|||
eval "$(${lib.getExe cfg.package} init - bash)"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = lib.mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = lib.mkIf cfg.enableZshIntegration ''
|
||||
export PYENV_ROOT="${cfg.rootDirectory}"
|
||||
eval "$(${lib.getExe cfg.package} init - zsh)"
|
||||
'';
|
||||
|
|
|
@ -11,7 +11,7 @@ in {
|
|||
|
||||
home.packages = [ pkgs.pywal ];
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
programs.zsh.initContent = ''
|
||||
# Import colorscheme from 'wal' asynchronously
|
||||
# & # Run the process in the background.
|
||||
# ( ) # Hide shell job control messages.
|
||||
|
|
|
@ -79,7 +79,7 @@ in {
|
|||
eval "$(${cfg.package}/bin/rbenv init - bash)"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${cfg.package}/bin/rbenv init - zsh)"
|
||||
'';
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ in {
|
|||
eval "$(${cfg.package}/bin/scmpuff init ${mkArgs "bash"})"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${cfg.package}/bin/scmpuff init ${mkArgs "zsh"})"
|
||||
'';
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
if [[ $options[zle] = on ]]; then
|
||||
. ${cfg.package}/share/skim/completion.zsh
|
||||
. ${cfg.package}/share/skim/key-bindings.zsh
|
||||
|
|
|
@ -106,7 +106,7 @@ in {
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
if [[ $TERM != "dumb" ]]; then
|
||||
eval "$(${starshipCmd} init zsh)"
|
||||
fi
|
||||
|
|
|
@ -57,7 +57,7 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration shEvalCmd;
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration shEvalCmd;
|
||||
|
||||
programs.nushell = mkIf cfg.enableNushellIntegration {
|
||||
extraConfig = ''
|
||||
|
|
|
@ -80,7 +80,7 @@ in {
|
|||
source ${cfg.package}/share/bash-completion/completions/watson
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
source ${cfg.package}/share/zsh/site-functions/_watson
|
||||
'';
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ in {
|
|||
|
||||
programs.bash.initExtra =
|
||||
mkIf cfg.enableBashIntegration shellIntegrationStr;
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration shellIntegrationStr;
|
||||
programs.zsh.initContent =
|
||||
mkIf cfg.enableZshIntegration shellIntegrationStr;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ in {
|
|||
in {
|
||||
bash.initExtra = mkIf cfg.enableBashIntegration bashIntegration;
|
||||
|
||||
zsh.initExtra = mkIf cfg.enableZshIntegration bashIntegration;
|
||||
zsh.initContent = mkIf cfg.enableZshIntegration bashIntegration;
|
||||
|
||||
fish.functions.${cfg.shellWrapperName} =
|
||||
mkIf cfg.enableFishIntegration fishIntegration;
|
||||
|
|
|
@ -56,7 +56,7 @@ in {
|
|||
})"
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${pkgs.z-lua}/bin/z --init zsh ${
|
||||
concatStringsSep " " cfg.options
|
||||
})"
|
||||
|
|
|
@ -73,7 +73,7 @@ in {
|
|||
eval "$(${zellijCmd} setup --generate-auto-start bash)"
|
||||
'');
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration (mkOrder 200 ''
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration (mkOrder 200 ''
|
||||
eval "$(${zellijCmd} setup --generate-auto-start zsh)"
|
||||
'');
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ in {
|
|||
'';
|
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration gpgInitStr;
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgZshInitStr;
|
||||
programs.zsh.initContent = mkIf cfg.enableZshIntegration gpgZshInitStr;
|
||||
programs.fish.interactiveShellInit =
|
||||
mkIf cfg.enableFishIntegration gpgFishInitStr;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue