summaryrefslogtreecommitdiffstats
path: root/lib/types.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/types.nix')
-rw-r--r--lib/types.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix
index 17e7a939fe3d..951fad291cca 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -427,7 +427,12 @@ rec {
# would be used, and use of `<` and `>` would break the XML document.
# It shouldn't cause an issue since this is cosmetic for the manual.
args.name = "‹name›";
- }).options;
+ }).options // optionalAttrs (freeformType != null) {
+ # Expose the sub options of the freeform type. Note that the option
+ # discovery doesn't care about the attribute name used here, so this
+ # is just to avoid conflicts with potential options from the submodule
+ _freeformOptions = freeformType.getSubOptions prefix;
+ };
getSubModules = modules;
substSubModules = m: submoduleWith (attrs // {
modules = m;