From ffbc3819e4f8aedb0bbd3a12e3dc70e35c0dbcea Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 17 Mar 2021 11:35:10 -0700 Subject: [PATCH] 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. --- modules/programs/zsh/prezto.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/programs/zsh/prezto.nix b/modules/programs/zsh/prezto.nix index 89a14746c..5c2853e7a 100644 --- a/modules/programs/zsh/prezto.nix +++ b/modules/programs/zsh/prezto.nix @@ -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) ''