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

/etc/zshrc may be overwritten on macos #593

Closed
hybras opened this issue Jul 28, 2023 · 3 comments
Closed

/etc/zshrc may be overwritten on macos #593

hybras opened this issue Jul 28, 2023 · 3 comments
Labels
Has workaround The issue has a workaround. MacOS Darwin/MacOS

Comments

@hybras
Copy link

hybras commented Jul 28, 2023

This might be for upstream to resolve first. I'm mentioning this here as a note for myself/others. The nix daemon script is sourced in /etc/{bashrc,zshrc} on macos. However, these files may be overwritten on os upgrade. They are not for 3rd party usage. Unclear what the solution is.

The workaround is to source the daemon in user-specific shell config (~/.zshrc or ~/.zprofile). This can be achieved by copying over the snippet inserted by the installer. However, this doesn't seem appropriate for the installer to do given that multiuser installs are the recommended option now.

NixOS/nix#3616
NixOS/nix#4169
NixOS/nix#5179
https://checkoway.net/musings/nix/#fixing-shell-integration

@Hoverbear Hoverbear added MacOS Darwin/MacOS Has workaround The issue has a workaround. labels Sep 8, 2023
@Hoverbear
Copy link
Contributor

Yeah this is unfortunately a known issue and there isn't really a clear way to fix it either here or in the installer. :(

@fd
Copy link

fd commented Sep 21, 2023

You can use this workaround I built. It can be used to manually fix the zshrc file or you can have it install a LaunchDaemon that will fix the file on boot.

@Hoverbear
Copy link
Contributor

#672 fixes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Has workaround The issue has a workaround. MacOS Darwin/MacOS
Projects
None yet
Development

No branches or pull requests

3 participants