replace list values for types.loaOf
This type has been deprecated in nixpkgs, these options will be replaced with types.attrsOf in the future.
This commit is contained in:
parent
7175f52860
commit
267f50e63d
2 changed files with 8 additions and 7 deletions
|
|
@ -5,6 +5,8 @@ with lib;
|
|||
let
|
||||
cfg = config.users;
|
||||
|
||||
named = xs: listToAttrs (map (x: { name = x.name; value = x; }) xs);
|
||||
|
||||
createdGroups = mapAttrsToList (n: v: v.name) cfg.groups;
|
||||
createdUsers = mapAttrsToList (n: v: v.name) cfg.users;
|
||||
|
||||
|
|
@ -54,8 +56,8 @@ in
|
|||
{ assertion = cfg.groups ? "nixbld" -> cfg.groups.nixbld.members != []; message = "refusing to remove all members from nixbld group, this would break nix"; }
|
||||
];
|
||||
|
||||
users.groups = mkIf cfg.nix.configureBuildUsers buildGroups;
|
||||
users.users = mkIf cfg.nix.configureBuildUsers buildUsers;
|
||||
users.groups = mkIf cfg.nix.configureBuildUsers (named buildGroups);
|
||||
users.users = mkIf cfg.nix.configureBuildUsers (named buildUsers);
|
||||
|
||||
users.knownGroups = mkIf cfg.nix.configureBuildUsers [ "nixbld" ];
|
||||
users.knownUsers = mkIf cfg.nix.configureBuildUsers (mkUsers (i: "nixbld${toString i}"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue