1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

treewide: zsh initExtraBeforeCompInit -> initContent

Migrating in tree usages of zsh initExtraBeforeCompInit to initContent
before deprecating, matching priority of current option.
This commit is contained in:
Austin Horstman 2025-03-19 15:49:40 -05:00
parent 10deb9d043
commit 94ea2cb536
3 changed files with 6 additions and 6 deletions

View file

@ -31,12 +31,12 @@ in {
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
programs.zsh.initExtraBeforeCompInit = let
programs.zsh.initContent = let
configFiles = pkgs.runCommand "hm_antidote-files" { } ''
echo "${zPluginStr cfg.plugins}" > $out
'';
hashId = parseHashId "${configFiles}";
in ''
in (mkOrder 550 ''
## home-manager/antidote begin :
source ${cfg.package}/share/antidote/antidote.zsh
${optionalString cfg.useFriendlyNames
@ -50,6 +50,6 @@ in {
antidote load $bundlefile $staticfile
## home-manager/antidote end
'';
'');
};
}

View file

@ -207,9 +207,9 @@ in {
'';
# Set `LS_COLORS` before Oh My Zsh and `initExtra`.
programs.zsh.initExtraBeforeCompInit = mkIf cfg.enableZshIntegration ''
programs.zsh.initContent = mkIf cfg.enableZshIntegration (mkOrder 550 ''
eval $(${pkgs.coreutils}/bin/dircolors -b ${dircolorsPath})
'';
'');
}
(mkIf (!config.home.preferXdgDirectories) {
home.file.".dir_colors".text = dircolorsConfig;

View file

@ -44,7 +44,7 @@ in {
config = mkIf cfg.enable {
home.packages = [ pkgs.zplug ];
programs.zsh.initExtraBeforeCompInit = ''
programs.zsh.initContent = mkOrder 550 ''
export ZPLUG_HOME=${cfg.zplugHome}
source ${pkgs.zplug}/share/zplug/init.zsh