Skip to content

/etc/zshrc may be overwritten on macos #593

@hybras

Description

@hybras

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has workaroundThe issue has a workaround.MacOSDarwin/MacOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions