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
default.nix: More thoroughly explain the macOS upgrade process #46207
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should make this part conditional based on builtins.currentSystem.
upgrade Nix. You may use `nix-env --version' to check which version you have. | ||
- If you have a multi-user Nix installation on macOS, update Nix by running: | ||
|
||
sudo -i nix-store -r ${fallback-paths.x86_64-darwin}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, semicolon and sudo
- If you have a multi-user Nix installation on macOS, update Nix by running: | ||
|
||
sudo -i nix-store -r ${fallback-paths.x86_64-darwin}; | ||
sudo -i ${fallback-paths.x86_64-darwin}/bin/nix-env --uninstall nix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be necessary given the next step, and might result in the user loosing their reference to nix-store/nix-env.
sudo -i nix-store -r ${fallback-paths.x86_64-darwin}; | ||
sudo -i ${fallback-paths.x86_64-darwin}/bin/nix-env --uninstall nix | ||
sudo -i ${fallback-paths.x86_64-darwin}/bin/nix-env -i ${fallback-paths.x86_64-darwin} | ||
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be more reliable sudo launchctl remove org.nixos.nix-daemon
.
I'm not sure if this is the right place to fix this, shouldn't this be in the installer instead? |
@infinisil the installer and the Nix documentation can't be updated without doing a full Nix release, unfortunately. |
@grahamc Is there a problem with doing a 2.1.1 release to fix the macOS installation? It's obviously a problem with Nix, not nixpkgs |
I ran into a kind of similar problem today. A coworker followed https://nixos.org/nix/manual/#ch-upgrading-nix to upgrade, but ended up actually downgrading from 2.0 to 1.11.6 due to the channel. I had to either perform an intermediate upgrade or grep for
NOTE: |
Any updates on this pull request, please? |
|
||
This version of Nixpkgs requires Nix >= ${requiredVersion}, please upgrade: | ||
|
||
- If you are running NixOS, `nixos-rebuild' can be used to upgrade your system. | ||
|
||
- Alternatively, with Nix > 2.0 `nix upgrade-nix' can be used to imperatively | ||
upgrade Nix. You may use `nix-env --version' to check which version you have. | ||
- If you have a multi-user Nix installation on macOS, update Nix by running: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we detect this scenario so we don't give confusing instructions to the user?
Alternatively, could we instead update the install script to detect an existing multi-user install and clean it up appropriately?
Thank you for your contributions.
|
Is this PR still up-to-date after the macOS Catalina issues (eg NixOS/nix#2925)? |
I marked this as stale due to inactivity. → More info |
Motivation for this change
The install instructions broke an IRC user,
floop
's setup and was pretty frustrating.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)