zsh: do not duplicate zsh.{profile,login,logout,env}Extra in prezto (#7061)

In #7057 changed the definition of how the prezto files where loaded
(from using `.source` to `.text`) and also manually add the text from
`zsh.{profile,login,logout,env}Extra` files to the prezto definitions,
but the last part was unnecessary and now we have duplicates inside the
file.

This commit fixes it.
This commit is contained in:
Thiago Kenji Okada 2025-05-14 13:30:51 +01:00 committed by GitHub
parent 7c1cefb983
commit 6bf057fc83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,6 @@ let
;
cfg = config.programs.zsh.prezto;
cfgZsh = config.programs.zsh;
relToDotDir =
file:
@ -429,24 +428,20 @@ in
home.file."${relToDotDir ".zprofile"}".text = ''
# Generated by Nix
source ${cfg.package}/share/zsh-prezto/runcoms/zprofile
${cfgZsh.profileExtra}
'';
home.file."${relToDotDir ".zlogin"}".text = ''
# Generated by Nix
source ${cfg.package}/share/zsh-prezto/runcoms/zlogin
${cfgZsh.loginExtra}
'';
home.file."${relToDotDir ".zlogout"}".text = ''
# Generated by Nix
source ${cfg.package}/share/zsh-prezto/runcoms/zlogout
${cfgZsh.logoutExtra}
'';
# Using mkAfter to make sure we load Home-Manager's environment
# variables first (see modules/prgrams/zsh.nix)
home.file."${relToDotDir ".zshenv"}".text = lib.mkAfter ''
# Generated by Nix
source ${cfg.package}/share/zsh-prezto/runcoms/zshenv
${cfgZsh.envExtra}
'';
home.file."${relToDotDir ".zpreztorc"}".text = ''
# Generated by Nix