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

Make installer allow preexisting by default #2258

Closed
wants to merge 1 commit into from

Conversation

matthewbauer
Copy link
Member

This seems to be working okay for me. What is currently holding this up?

/cc @grahamc

@shlevy
Copy link
Member

shlevy commented Jun 28, 2018

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?

@matthewbauer
Copy link
Member Author

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.

@edolstra
Copy link
Member

We just need to make sure that all actions done by the installer are idempotent.

@grahamc
Copy link
Member

grahamc commented Jun 28, 2018

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.

@grahamc
Copy link
Member

grahamc commented Jun 28, 2018

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.

@shlevy
Copy link
Member

shlevy commented Jun 28, 2018

@matthewbauer Yes, it's in exactly those cases where automatically going ahead is something to worry about though.

@matthewbauer
Copy link
Member Author

matthewbauer commented Jun 28, 2018

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.

@matthewbauer
Copy link
Member Author

matthewbauer commented Jul 29, 2018

@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:

sudo -i sh -c 'nix-channel --update && nix-env -iA nixpkgs.nix'
sudo launchctl stop org.nixos.nix-daemon
sudo launchctl start org.nixos.nix-daemon

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants