Skip to content

Commit

Permalink
install: also configure ~/.zshenv
Browse files Browse the repository at this point in the history
The default login shell for users on macOS 10.15 changed from bash to
zsh.  So while generally nonstandard we need to configure it to make nix
function out of the box on macOS.
  • Loading branch information
LnL7 committed Dec 17, 2019
1 parent 1cd15c5 commit 97c6595
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/install-nix-from-closure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,17 @@ if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then
break
fi
done
for i in .zshenv .zshrc; do
fn="$HOME/$i"
if [ -w "$fn" ]; then
if ! grep -q "$p" "$fn"; then
echo "modifying $fn..." >&2
echo "if [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn"
fi
added=1
break
fi
done
fi

if [ -z "$added" ]; then
Expand Down

0 comments on commit 97c6595

Please sign in to comment.