types/merge: move 'configuration' of submodules into nested attribute set

Changed files
+5 -5
lib
+2 -2
lib/tests/modules.sh
···
# Check that composed types expose the 'valueMeta'
# attrsOf submodule (also on merged options,types)
-
checkConfigOutput '42' options.attrsOfModule.valueMeta.attrs.foo.options.bar.value ./composed-types-valueMeta.nix
-
checkConfigOutput '42' options.mergedAttrsOfModule.valueMeta.attrs.foo.options.bar.value ./composed-types-valueMeta.nix
# listOf submodule (also on merged options,types)
checkConfigOutput '42' config.listResult ./composed-types-valueMeta.nix
···
# Check that composed types expose the 'valueMeta'
# attrsOf submodule (also on merged options,types)
+
checkConfigOutput '42' options.attrsOfModule.valueMeta.attrs.foo.configuration.options.bar.value ./composed-types-valueMeta.nix
+
checkConfigOutput '42' options.mergedAttrsOfModule.valueMeta.attrs.foo.configuration.options.bar.value ./composed-types-valueMeta.nix
# listOf submodule (also on merged options,types)
checkConfigOutput '42' config.listResult ./composed-types-valueMeta.nix
+2 -2
lib/tests/modules/composed-types-valueMeta.nix
···
];
# Result options to expose the list module to bash as plain attribute path
options.listResult = mkOption {
-
default = (builtins.head options.listOfModule.valueMeta.list).options.bar.value;
};
options.mergedListResult = mkOption {
-
default = (builtins.head options.mergedListOfModule.valueMeta.list).options.bar.value;
};
}
)
···
];
# Result options to expose the list module to bash as plain attribute path
options.listResult = mkOption {
+
default = (builtins.head options.listOfModule.valueMeta.list).configuration.options.bar.value;
};
options.mergedListResult = mkOption {
+
default = (builtins.head options.mergedListOfModule.valueMeta.list).configuration.options.bar.value;
};
}
)
+1 -1
lib/types.nix
···
{
headError = checkDefsForError check loc defs;
value = configuration.config;
-
valueMeta = configuration;
};
};
emptyValue = {
···
{
headError = checkDefsForError check loc defs;
value = configuration.config;
+
valueMeta = { inherit configuration; };
};
};
emptyValue = {