better type for config.groups
instead of an attrset of anything, specify the expected structure of each value
This commit is contained in:
parent
228b270385
commit
690cedf00d
1 changed files with 15 additions and 3 deletions
|
@ -36,7 +36,17 @@ in {
|
|||
};
|
||||
};
|
||||
groups = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
gid = mkOption {
|
||||
type = types.int;
|
||||
};
|
||||
usernames = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
users = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
|
@ -107,9 +117,11 @@ in {
|
|||
passwd = "";
|
||||
shell = "/bin/sh";
|
||||
};
|
||||
groups.root = {
|
||||
groups = {
|
||||
root = {
|
||||
gid = 0; usernames = ["root"];
|
||||
};
|
||||
};
|
||||
|
||||
filesystem = dir {
|
||||
bin = dir {
|
||||
|
|
Loading…
Reference in a new issue