Make normal ID allocation range configurable (normalIdRange) - #61
Open
Mic92 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
This helps when people add static uids after the fact since it gives a save range that won't be used by userborn ever. |
Systems that rely on statically assigned UIDs/GIDs (e.g. for NFS) need dynamic allocation to stay out of the range used for those static IDs. Add a top-level normalIdRange field to the config (default 1000-29999) that controls the range from which normal user/group IDs are dynamically allocated. System IDs remain fixed at 1-999.
nikstur
reviewed
Jul 25, 2026
nikstur
left a comment
Owner
There was a problem hiding this comment.
Thanks! This generally makes sense but it cannot be wired up in Nixpkgs right now because there is no option for it.
| /// The range from which normal user/group IDs are dynamically allocated. | ||
| #[derive(Deserialize, Debug, Clone, Copy)] | ||
| #[serde(rename_all = "camelCase")] | ||
| pub struct IdRange { |
Owner
There was a problem hiding this comment.
This type and its impl belong in the config module.
| pub struct Config { | ||
| /// The range from which normal user/group IDs are dynamically allocated. | ||
| #[serde(default)] | ||
| pub normal_id_range: IdRange, |
Owner
There was a problem hiding this comment.
What would be the option to set this in Nixpkgs?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #60.
Adds a top-level
normalIdRangeconfig field (default 1000-29999) controlling the range for dynamically allocated normal user/group IDs, so statically assigned IDs (e.g. for NFS) can be kept outside of it. System IDs stay at 1-999.