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
Make installer allow preexisting by default #2258
Conversation
I think the main problem is if the preexisting installation is somehow broken, continuing with an automated process is likely to make fixing it even harder. If you have a working preexisting solution, why aren't you just upgrading Nix with Nix? |
Well there are lots of times when the Nix commands can be broken & there is no way to upgrade. This will happen to users who upgrade to macOS Mojave with old Nix versions. |
We just need to make sure that all actions done by the installer are idempotent. |
Well, the actions need to be more than idempotent -- the installer needs to handle every possible installation which already exists and know the right thing to do: fixing permissions to make it multi-user compatible, or fall back to the single user, or fix permissions on a badly configured multi-user setup, or fail ... etc. I much prefer the safety as is, and I think that expanding the tool to support handling weird installs potentially makes this a much more complicated process. This complexity is why I don't support it now. |
Note, I do agree we should allow the script to be re-run in happy paths, however it is all the scary dark paths that I am worried about. |
@matthewbauer Yes, it's in exactly those cases where automatically going ahead is something to worry about though. |
I don't see how it's going to mess up your system though. The only critical part is installing the daemon - everything else shouldn't break anything. At least on macOS, even a misconfigured daemon won't break anything AFAICT. |
@grahamc If the new installer will not support upgrades, could you update the 3rd bullet in default.nix: https://github.com/NixOS/nixpkgs/blob/master/default.nix I am not sure what to say there, exactly. It probably should just explain how to update the channel & reinstall Nix as root (that should be all that is needed IIUC), followed by how to restart the daemon. But, it definitely will need to be updated for when we want to move minver.nix to 2.0. This was how I updated to Nix 2.0 on macOS:
I have no idea if that was the correct way though. |
This seems to be working okay for me. What is currently holding this up? /cc @grahamc
This seems to be working okay for me. What is currently holding this up?
/cc @grahamc