nix-darwin has recently switched over to running the entire system activation process as root.
If you’re getting this error, it means that you need to use sudo darwin-rebuild switch instead of darwin-rebuild switch from now on.
If you’re using nix run nix-darwin, this is not necessary past the initial installation process and we recommend using darwin-rebuild directly instead. You can update your system (nix flake update or nix-channel --update && sudo nix-channel --update), run darwin-rebuild switch one more time to activate the new version, and then use sudo darwin-rebuild switch after that.
You might also get an error message describing the changes and referencing system.primaryUser. Following the instructions in the message should be enough to get your configuration migrated.
If you have any other issues or need clarification about anything in this announcement, please do open a new issue.
nix-darwin has recently switched over to running the entire system activation process as
root.If you’re getting this error, it means that you need to use
sudo darwin-rebuild switchinstead ofdarwin-rebuild switchfrom now on.If you’re using
nix run nix-darwin, this is not necessary past the initial installation process and we recommend usingdarwin-rebuilddirectly instead. You can update your system (nix flake updateornix-channel --update && sudo nix-channel --update), rundarwin-rebuild switchone more time to activate the new version, and then usesudo darwin-rebuild switchafter that.You might also get an error message describing the changes and referencing
system.primaryUser. Following the instructions in the message should be enough to get your configuration migrated.If you have any other issues or need clarification about anything in this announcement, please do open a new issue.