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 {
|
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 {
|
users = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
|
@ -107,9 +117,11 @@ in {
|
||||||
passwd = "";
|
passwd = "";
|
||||||
shell = "/bin/sh";
|
shell = "/bin/sh";
|
||||||
};
|
};
|
||||||
groups.root = {
|
groups = {
|
||||||
|
root = {
|
||||||
gid = 0; usernames = ["root"];
|
gid = 0; usernames = ["root"];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
filesystem = dir {
|
filesystem = dir {
|
||||||
bin = dir {
|
bin = dir {
|
||||||
|
|
Loading…
Reference in a new issue