diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 268288890..a99cfdb95 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -815,10 +815,7 @@ in )) (mkOrder 900 ( - (optionalString cfg.prezto.enable ( - builtins.readFile "${cfg.prezto.package}/share/zsh-prezto/runcoms/zshrc" - )) - + (lib.concatStrings ( + (lib.concatStrings ( map (plugin: '' if [[ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]]; then source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" diff --git a/modules/programs/zsh/prezto.nix b/modules/programs/zsh/prezto.nix index f824c4dc6..fbecb0284 100644 --- a/modules/programs/zsh/prezto.nix +++ b/modules/programs/zsh/prezto.nix @@ -586,6 +586,11 @@ in ''} ${cfg.extraConfig} ''; + + programs.zsh.initContent = lib.mkOrder 850 '' + # Load prezto + source ${cfg.package}/share/zsh-prezto/runcoms/zshrc + ''; } ] );