prezto: fix environment files being overwritten (#1863)

Fixed the breakage for prezto introduced in #1778.

The previous method created issues where certain configuration files would get
replaced by prezto's variants instead of being merged as before. This led to
issues like no config being loaded if `home.zsh.dotDir` was set.

The old method of loading these files has been restored. This fixes the issue.
This commit is contained in:
anna 2021-03-17 11:35:10 -07:00 committed by GitHub
parent 920ea74afe
commit ffbc3819e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -351,16 +351,16 @@ in {
};
};
config = mkIf cfg.enable (mkMerge [{
home.file."${relToDotDir ".zprofile"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zprofile";
home.file."${relToDotDir ".zlogin"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogin";
home.file."${relToDotDir ".zlogout"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogout";
home.file."${relToDotDir ".zprofile"}".text =
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zprofile";
home.file."${relToDotDir ".zlogin"}".text =
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogin";
home.file."${relToDotDir ".zlogout"}".text =
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zlogout";
home.packages = with pkgs; [ zsh-prezto ];
home.file."${relToDotDir ".zshenv"}".source =
"${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshenv";
home.file."${relToDotDir ".zshenv"}".text =
builtins.readFile "${pkgs.zsh-prezto}/share/zsh-prezto/runcoms/zshenv";
home.file."${relToDotDir ".zpreztorc"}".text = ''
# Generated by Nix
${optionalString (cfg.caseSensitive != null) ''