From f5f58e722824a20872eb4f794063bc0e00d9a493 Mon Sep 17 00:00:00 2001 From: Dylan Pyle Date: Tue, 30 Nov 2021 21:28:17 -0500 Subject: [PATCH] Make $PATH additions conditional one being not-inside-nix --- .zshrc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.zshrc b/.zshrc index 181fd3e..d996ac7 100644 --- a/.zshrc +++ b/.zshrc @@ -131,19 +131,24 @@ PROMPT=$cwd' '$current_branch' export DENO_INSTALL="/Users/dylan/.deno" -export PATH=/usr/local/opt/findutils/libexec/gnubin:$PATH -export PATH=/opt/local/bin:/opt/local/sbin:$PATH -export PATH=/usr/local/bin:$PATH -export PATH=/opt/homebrew/bin:$PATH -export PATH=~/bin:$PATH -export PATH=/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH +if [[ $NIX_STORE == '' ]]; then + # If we're inside a nix shell, don't set certain paths that we expect that to + # provide (e.g. findutils, node, homebrew) + export PATH=/usr/local/opt/findutils/libexec/gnubin:$PATH + export PATH=/opt/local/bin:/opt/local/sbin:$PATH + export PATH=/usr/local/bin:$PATH + export PATH=/opt/homebrew/bin:$PATH + export PATH="/Users/dylan/n/bin:$PATH" + export PATH=~/bin:$PATH + export PATH=/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH +fi + export PATH=~/.fastlane/bin:$PATH export PATH=~/Library/Python/3.6/bin:$PATH export PATH=/usr/local/texlive/2017basic/bin/x86_64-darwin:$PATH export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin":$PATH export PATH="$HOME/.cargo/bin:$PATH" export PATH="$DENO_INSTALL/bin:$PATH" -export PATH="/Users/dylan/n/bin:$PATH" export EDITOR='nvim'