diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-09-05 17:40:09 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-09-05 17:40:09 +0200 |
commit | 20be024d1bae622409fa56844b2f8799bbf29bb0 (patch) | |
tree | 1d79b9a6f943a793438132386462f08351521fd3 /nixos/modules/config/users-groups.nix | |
parent | c4a35d8cf9548344cedf259363eef4332fd2e072 (diff) |
Fix subuid/subgid generation
I don't think we need to filter users with an unset uid, because
mkSubuidEntry/mkSubgidEntry don't references the uid.
Diffstat (limited to 'nixos/modules/config/users-groups.nix')
-rw-r--r-- | nixos/modules/config/users-groups.nix | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index d172ddb6bca7..619f329d74c5 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -276,23 +276,17 @@ let }; }; - filterNull = a: filter (x: hasAttr a x && getAttr a x != null); - - sortOn "gid" (filterNull "gid" (attrValues cfg.extraGroups)) - sortOn "uid" (filterNull "uid" (attrValues cfg.extraUsers)) mkSubuidEntry = user: concatStrings ( map (range: "${user.name}:${toString range.startUid}:${toString range.count}\n") - user.subUidRanges); + user.subUidRanges); - subuidFile = concatStrings (map mkSubuidEntry ( - sortOn "uid" (filterNull "uid" (attrValues cfg.extraUsers)))); + subuidFile = concatStrings (map mkSubuidEntry (attrValues cfg.extraUsers)); mkSubgidEntry = user: concatStrings ( map (range: "${user.name}:${toString range.startGid}:${toString range.count}\n") user.subGidRanges); - subgidFile = concatStrings (map mkSubgidEntry ( - sortOn "uid" (filterNull "uid" (attrValues cfg.extraUsers)))); + subgidFile = concatStrings (map mkSubgidEntry (attrValues cfg.extraUsers)); idsAreUnique = set: idAttr: !(fold (name: args@{ dup, acc }: let |