nixos: fix setups where users.users.<id>.name is not <id>#306
Open
taliyahwebb wants to merge 1 commit intonix-community:masterfrom
Open
nixos: fix setups where users.users.<id>.name is not <id>#306taliyahwebb wants to merge 1 commit intonix-community:masterfrom
users.users.<id>.name is not <id>#306taliyahwebb wants to merge 1 commit intonix-community:masterfrom
Conversation
also adds wording to the toplevel option descriptions which "name" should be used where - the name as in the module for nixos whenever its a submodule name - the name as in the final linux system whenever it's a .name option - since groups are only ever set as .group those are always final group names and never resolved from `users.groups.<group>.name`
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.
TL;DR
This PR is pretty similar to #252 but achives a few extra goals.
# Description)# Testing)It is properly tested, test cases and results see below.
In Depth
Description
Guideline for which "name" should be used where
users.users.<name>) for nixos whenever its a submodule nameusers.users.<user>.name) whenever it's a .name optionusers.groups.<group>.nameTesting
I have tested and verified the following cases:
users.users.<user>.name == "<user>"users.users.<user>.name != "<user>"(in this case I assumehome-manager.users.<user>.home.username == users.users.<user>.nameif not that's prob wrong in of it self)Support Matrix Before PR
environment.persistence.users.<user>dirs without explicit user config (3)environment.persistence.users.<user>dirs with explicit user config (4)home.persistencedirs without explicit user config (5)home.persistencedirs with explicit user config (6)Support Matrix After PR
environment.persistence.users.<user>dirs without explicit user config (3)environment.persistence.users.<user>dirs with explicit user config (4)home.persistencedirs without explicit user config (5)home.persistencedirs with explicit user config (6)Numbered Test Cases
In the diff cases this was used
In the tests the permissions of dirs and parent dirs was verified to be ok
1
2
3
4
5
6
7