Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use /etc/zshenv instead of /etc/zshrc on macOS Catalina #3456

Closed
surajbarkale opened this issue Mar 30, 2020 · 3 comments
Closed

Use /etc/zshenv instead of /etc/zshrc on macOS Catalina #3456

surajbarkale opened this issue Mar 30, 2020 · 3 comments

Comments

@surajbarkale
Copy link
Contributor

By default, nix adds following lines to /etc/zshrc

# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix

However, this file can get overwritten during OS update. This happened for me when upgrading to macos 10.15.4 recently.

I suggest writing these lines to /etc/zshenv instead which is not present by default and is loaded by zsh.

surajbarkale added a commit to surajbarkale/nix that referenced this issue May 22, 2020
As noted in NixOS#3456 the `/etc/zshenv` file provides a better place for sourcing the nix environment.
@lilyball
Copy link
Member

Looks like this issue can be closed now.

@grahamc
Copy link
Member

grahamc commented Jul 28, 2020

Thanks!

@YorikSar
Copy link
Contributor

It seems fix for this issue triggered #4169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants