-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
nixos-rebuild: Ask for admin privileges #55802
Comments
I think only nixos-rebuild switch needs root priveleges. |
Right, I commonly build my system without root privileges with |
Good catch. I wasn't aware. I've been doing all commands as root. |
Prompting the user for the sudo password at the beginning can save time. Think of how installing Windows would (at least used) take a while due to blocking dialogs showing up while the user is off doing another task (since the install takes a while). On the other hand, the user may want to run as superuser only what's necessary, for security reasons. I don't know if this is a legitimate concern once the entire the nixos-rebuild process is taken into account. |
@aaronjanse It does so much more. Requesting root is an essential user experience change. Linux land is filled with unhelpful error messages. This habit has to be fixed. |
Seems like the consensus is to improve the error message based on #57333 (comment) |
Thank you for your contributions.
|
It seems there is a conscious decision to not automatically run sudo, but make it explicit. It is possible to run sudo automatically when using
Should the user be informed about this option when they run into permission errors? |
The problem with that |
Curious if there are any favourite workarounds people are using for this. I suppose I will just end up using a deployment tool, but my scale is reallly small, so if I could deploy using just |
bump It could be nice to provide root password to let nix make the escalation using another method than sudo with an user utilising a kind of wheel group |
Issue description
nixos-rebuild
should ask for elevated privileges.citing this: VSCode does not build (declarative installation) #55790
The text was updated successfully, but these errors were encountered: