-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
treewide: Switch to system users #71055
Conversation
Nice, I planned to do this as part of NixOS/rfcs#52. This should be backwards compatible as I check recently. Currently there is a limit of 100 dynamic system users, but #65698 will increase this, so this shouldn't be a problem. |
@infinisil Yes, it seems like switch-to-configuration prints a warning but doesn't change UIDs of existing users. Also, as this only modifys 47 users, I doubt this PR will be the cause of UID exhaustion ;) |
Okay, I stand corrected. 100 is probably not enough. Looks like #65698 should be merged first |
Well the system uid range isn't only for nixpkgs. People could define lots of services outside of nixpkgs. And 100 services being enabled over the lifetime of a system doesn't seem far fetched. So I'd like the PR for increasing this limit be merged first. Should be quick after the RFC is accepted, which will be in less than a week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you share how you applied the change treewide?
Also, is treewide
the correct prefix, as opposed to e.g. *
?
@asymmetric Unfortunately, the command is not in my shell history anymore. I was able to reproduce it, so this one is pretty similar: Idk about the PR prefix, maybe someone with more experience can help me out here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RFC is accepted, this change looks good, I'll merge 🎀
So the new policy would be: Every service should use either |
I mentioned in the RFC that something like this should be added to the manual, haven't done that yet |
treewide: Switch to system users (cherry picked from commit dd0a47e)
treewide: Switch to system users (cherry picked from commit dd0a47e)
Could somebody with Borg permission run the tests?
Motivation for this change
It's annoying to have users (actual people) with fixed UIDs and services clashing for UIDs.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @