From 77f572f07234e500d0d3aeecd03a2af96cc3da06 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Sun, 11 Sep 2016 16:35:50 +0900 Subject: users-groups module: optionSet -> submodule --- nixos/modules/config/users-groups.nix | 60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index d92deb85d2a..57e4940378b 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -131,13 +131,12 @@ let }; subUidRanges = mkOption { - type = types.listOf types.optionSet; + type = with types; listOf (submodule subordinateUidRange); default = []; example = [ { startUid = 1000; count = 1; } { startUid = 100001; count = 65534; } ]; - options = [ subordinateUidRange ]; description = '' Subordinate user ids that user is allowed to use. They are set into /etc/subuid and are used @@ -146,13 +145,12 @@ let }; subGidRanges = mkOption { - type = types.listOf types.optionSet; + type = with types; listOf (submodule subordinateGidRange); default = []; example = [ { startGid = 100; count = 1; } { startGid = 1001; count = 999; } ]; - options = [ subordinateGidRange ]; description = '' Subordinate group ids that user is allowed to use. They are set into /etc/subgid and are used @@ -310,32 +308,36 @@ let }; subordinateUidRange = { - startUid = mkOption { - type = types.int; - description = '' - Start of the range of subordinate user ids that user is - allowed to use. - ''; - }; - count = mkOption { - type = types.int; - default = 1; - description = ''Count of subordinate user ids''; + options = { + startUid = mkOption { + type = types.int; + description = '' + Start of the range of subordinate user ids that user is + allowed to use. + ''; + }; + count = mkOption { + type = types.int; + default = 1; + description = ''Count of subordinate user ids''; + }; }; }; subordinateGidRange = { - startGid = mkOption { - type = types.int; - description = '' - Start of the range of subordinate group ids that user is - allowed to use. - ''; - }; - count = mkOption { - type = types.int; - default = 1; - description = ''Count of subordinate group ids''; + options = { + startGid = mkOption { + type = types.int; + description = '' + Start of the range of subordinate group ids that user is + allowed to use. + ''; + }; + count = mkOption { + type = types.int; + default = 1; + description = ''Count of subordinate group ids''; + }; }; }; @@ -428,7 +430,7 @@ in { users.users = mkOption { default = {}; - type = types.loaOf types.optionSet; + type = with types; loaOf (submodule userOpts); example = { alice = { uid = 1234; @@ -444,7 +446,6 @@ in { Additional user accounts to be created automatically by the system. This can also be used to set options for root. ''; - options = [ userOpts ]; }; users.groups = mkOption { @@ -453,11 +454,10 @@ in { { students.gid = 1001; hackers = { }; }; - type = types.loaOf types.optionSet; + type = with types; loaOf (submodule groupOpts); description = '' Additional groups to be created automatically by the system. ''; - options = [ groupOpts ]; }; # FIXME: obsolete - will remove. -- cgit 1.4.1