diff --git a/lib/types.nix b/lib/types.nix index 6fd6de7e1fd9..1845b6ae339e 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -486,9 +486,15 @@ rec { else value ) defs; + freeformType = (evalModules { + inherit modules specialArgs; + args.name = "‹name›"; + })._module.freeformType; + in mkOptionType rec { name = "submodule"; + description = freeformType.description or name; check = x: isAttrs x || isFunction x || path.check x; merge = loc: defs: (evalModules {