nixpkgs
ff8fd213 - nixos-rebuild: use sudo when whoami != root

Commit
3 years ago
nixos-rebuild: use sudo when whoami != root Currently, executing `nixos-rebuild switch` as a non-root user will result in a somewhat confusing error about being unable to link a profile to a nix store path. This is not ideal, especially as we already have most of the code to handle this properly and use `sudo` to elevate permissions to install. This is preferrable for flakes (better eval caching), and also more intuitive for new users.
Author
Committer
Parents
Loading