-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[UX] Better info for untrusted users #8248
Comments
If this is something that would be appreciated, I'd be happy to work on this. |
|
The message should also tell you to look at nix.conf man page to read about the substituters, where some extra explanation have been added (see the diff in #7461). I agree the message could be clearer, but in the previous PR it has been said by the maintenance team that the message should be short and defer any explanation to the documentation. |
Someone pointed out to me that they have |
This is like having sudo with passwordless. I let you think about the possible exploits |
I kind of agree. At the same time, isn't having yourself in the trusted-users the same problem? And having that option at all dangerous? |
it is exactly the same issue, that's why it's not a default
options are harmless when used wisely, there are cases when you want the build user to be able to actually build without needing to be root, in a docker environment with nix-daemon service for instance. Basically, an interactive user where you log in should have the least privileges possible. Having a dedicated user that would be a nix trusted user makes more sense than giving this power to your own user, as long as there is some kind of authentication process to switch from one to the other (sudo with password, su - with password etc...) |
|
Related: #6672 |
Whatever the solution is, this is definitively an UX and documentation issue for me. I'm a new user and I was not able to figure out what I'm supposed to do. My search mostly yields issues or discussions like this one. I just want a resonantly safe developer environment without warnings. |
edit # only have root in trusted-users to prevent privilege escalation
trusted-users = root
# add cache urls here
substituters = https://cache.nixos.org <other-cache>
# add cache public keys here
trusted-public-keys = <nixos-cache-public-key> <other-cache-public-key> replace |
Thank you. This was the final kick I needed to get rid of the warnings, although the solution is not 100%. In I added I saw somewhere that the warning is related to config in my home (rather than the global one), but if I delete the config file Back to the UX, if the file or the message would tell me that I needed to restart the daemon, that would have also helped. (As a total nix newbie, my questions are: Is there a daemon? Does it pick the config during start or when I do It seems to me that |
Right. There is a daemon (unless running in single-user mode). It does need to be restarted to pick up the settings (usually If you have a lot of substituters and lookup is slow, another option is to use |
Since 2.14, we have
nix/src/libstore/daemon.cc
Line 225 in 7474a90
From user (most who use nix out of necessity, not because they like it particularly much) reports we know that this warning is
It might be more helpful to (our) users if there was a message right at the start along the lines of:
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: