Commit 638af275746a

Vincent Demeester <vincent@sbr.pm>
2020-02-14 16:05:58
profiles.zsh: move env set to envExtra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 648bd36
Changed files (1)
modules
profiles
modules/profiles/zsh.nix
@@ -39,9 +39,6 @@ in
           EMOJI_CLI_USE_EMOJI = "yes";
           ZSH_HIGHLIGHT_HIGHLIGHTERS = [ "main" "brackets" "pattern" ];
         };
-        sessionVariables = {
-          GOPATH = "${config.home.homeDirectory}";
-        };
         shellAliases = import ./aliases.shell.nix;
         plugins = [
           {
@@ -91,6 +88,12 @@ in
              };
           }
         ];
+        envExtra = ''
+        export GOPATH=${config.home.homeDirectory}
+        if [ -d $HOME/.krew/bin ]; then
+          export PATH=$HOME/.krew/bin:$PATH
+        fi
+        '';
         loginExtra = ''
         export GOPATH=${config.home.homeDirectory}
         '';
@@ -131,7 +134,6 @@ in
           alias -g GB='`git rev-parse --abbrev-ref HEAD`'
           alias -g GR='`git rev-parse --show-toplevel`'
           (( $+commands[jq] )) && alias -g MJ="| jq -C '.'"  || alias -g MJ="| ${pkgs.python3}/bin/python -mjson.tool"
-          export PATH=$HOME/.krew/bin:$PATH
         '';
         profileExtra = ''
           if [ -e /home/vincent/.nix-profile/etc/profile.d/nix.sh ]; then . /home/vincent/.nix-profile/etc/profile.d/nix.sh; fi