-
Notifications
You must be signed in to change notification settings - Fork 52
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
ZSH config sometimes needs to be added to user instead of global on MacOS #558
Comments
After chatting with @cole-h I think we should only be warning for these errors. Could you help me fully understand the situation?
|
Sorry, meant to put that in after the zshrc code block:
I went ahead and nuked my install completely and am starting from scratch. I'll see if maybe there was something small I missed. |
Re ran it again and manually added nix to the path worked this time:
However, this did not get added by the install script, and I don't have a particularly weird dotfile setup, so it seems odd that it didn't get added (or perhaps this is expected behavior?) |
Which file did you add this code to? |
~/.zshrc |
The self-test uses root's zsh, I wonder if your root's zsh somehow isn't importing the system zsh profiles... |
I sudo su'd into my root profile, there is no .zshrc present in root's home dir. /etc/zshrc does contain the Nix if statement (#Nix-#End Nix), but no path appends or prepends. |
Does Nix work from your root |
Yes, it does work from my root zsh shell. |
I ran into this same issue this week on both a 2022 M1 macbook running macOS 13.5 and a 2015 Intel macbook running macOS 12.6.8. In both cases the installer gives the same warning that BagMan9 posted in the issue description. From the comments, I tried switching around to different shells with the following results: My normal shell ( > which nix
nix not found Switching into > sh
> which nix
(blank) Switching into root ( > sudo su -
> which nix
/var/root/.nix-profile/bin/nix EDIT: I ran into similar problems with the official installer. This comment helped me get things working: not only do you have to add the daemon script to your local zshrc, you also have to remove it from the global zshrc. |
Self testing is no longer a failure, but a warning. However this issue is still open since it's also describing a Mac issue with zsh. |
Error
Metadata
Initially, I thought the issue was not adding nix to my .zshrc, but even after adding nix, sourcing it, and a reboot, it doesn't seem to be working.
This is what I added for reference:
I am running macOS Sonoma, which is beta software. If this is expected, or you guys don't want to deal with issues on beta hardware, I totally understand.
The text was updated successfully, but these errors were encountered: