-
-
Notifications
You must be signed in to change notification settings - Fork 74
darwin.rs: handle new root only activation #238
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
Conversation
73633f8 to
aee93d4
Compare
|
Currently calls activation scripts directly, sounds like we should be using the |
bb7d429 to
dc33934
Compare
Using nh fork with support for root activation until nix-community/nh#238 is merged, using nix-darwin fork with the plan p1 changes until that's merged.
|
Should we check whether the user has an older nix-darwin? |
That’s what the deprecation check is for, we see if it’s missing from the activation script. If it is, it’s an older version |
|
Seems like this will be the way it works in nix-darwin/nix-darwin#1341 . I've been using this branch on my nixos desktop and macbook since I created the PR. |
|
The diff looks good. Not large enough for me to nit either, so I think we can merge today. Though I'm compelled to ask, is this a version specific thing? NH 4.0 has made it into nixpkgs, and changing it now might cause issues. Would that be the case, or can we merge this, release 4.1.0 and PR nixpkgs to provide the new change? |
It's backwards compatible with current nix-darwin. We check for the existence of the deprecation marker or a missing |
|
Just making sure. I haven't used Darwin at any point, and I would like to avoid merging broken behaviour. In changes are backward compatible, I can merge this with the addition of a changelog entry in CHANGELOG.md. |
Nix-darwin is being rewritted to move to root activation and deprecating the user activation script. Check whether the script we are activating with contains the deprecation notice.
In the future the script will be removed, if it does get removed we should just call the `activate` script as root.
Recommended to use the darwin-rebuild activate command by maintainers.
|
Rebased and added changelog entries for changes. |
|
Thank you, merging once the CI passes. |
Thanks raf, appreciate it |
Darwin root activation support merged into main in nix-community/nh#238
Darwin root activation support merged into main in nix-community/nh#238
Closes #233
Basically, with the new nix-darwin rewrite everything is moved to root activation. I check if the nix-darwin user activation script contains the deprecation notice.
If it does, we just call the activate script only. (Where the old user activation stuff has been moved)Also, moved to using thedarwin-rebuildscript instead of the activation scripts directly so thatnix-darwincan handle migrations themselves and we don't have to worry about the current implementation details every time a change is made upstream. We just elevate theactivatewhen it needs to be.Marking draft until the deprecation marker is solidified in nix-darwin/nix-darwin#1341