modules/frontmatter: init module interface as source of frontmatter

This commit is contained in:
Johannes Kirschbauer
2024-11-15 16:00:15 +01:00
parent fca6e875a2
commit d5c2c1af67
6 changed files with 102 additions and 63 deletions

View File

@@ -13,6 +13,7 @@ in
type = types.str;
default = moduleName;
readOnly = true;
visible = false;
};
options.roles = lib.mapAttrs (
_name: _:
@@ -37,24 +38,9 @@ in
}
) rolesAttrs;
options.instances = mkOption {
default = { };
type = types.submoduleWith {
modules = [
{
options = {
max = mkOption {
type = types.nullOr types.int;
default = null;
};
};
}
];
};
};
# The resulting assertions
options.assertions = mkOption {
visible = false;
default = { };
type = types.attrsOf (
types.submoduleWith {