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

This commit is contained in:
Johannes Kirschbauer
2025-06-20 08:30:58 +02:00
parent 50bef19448
commit cd2e5bd46c
3 changed files with 5 additions and 5 deletions

View File

@@ -768,8 +768,8 @@ checkConfigOutput '2' config.listOfResult ./types-valueMeta.nix
# Check that composed types expose the 'valueMeta' # Check that composed types expose the 'valueMeta'
# attrsOf submodule (also on merged options,types) # attrsOf submodule (also on merged options,types)
checkConfigOutput '42' options.attrsOfModule.valueMeta.attrs.foo.options.bar.value ./composed-types-valueMeta.nix checkConfigOutput '42' options.attrsOfModule.valueMeta.attrs.foo.configuration.options.bar.value ./composed-types-valueMeta.nix
checkConfigOutput '42' options.mergedAttrsOfModule.valueMeta.attrs.foo.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) # listOf submodule (also on merged options,types)
checkConfigOutput '42' config.listResult ./composed-types-valueMeta.nix checkConfigOutput '42' config.listResult ./composed-types-valueMeta.nix

View File

@@ -64,10 +64,10 @@ in
]; ];
# Result options to expose the list module to bash as plain attribute path # Result options to expose the list module to bash as plain attribute path
options.listResult = mkOption { options.listResult = mkOption {
default = (builtins.head options.listOfModule.valueMeta.list).options.bar.value; default = (builtins.head options.listOfModule.valueMeta.list).configuration.options.bar.value;
}; };
options.mergedListResult = mkOption { options.mergedListResult = mkOption {
default = (builtins.head options.mergedListOfModule.valueMeta.list).options.bar.value; default = (builtins.head options.mergedListOfModule.valueMeta.list).configuration.options.bar.value;
}; };
} }
) )

View File

@@ -1264,7 +1264,7 @@ let
{ {
headError = checkDefsForError check loc defs; headError = checkDefsForError check loc defs;
value = configuration.config; value = configuration.config;
valueMeta = configuration; valueMeta = { inherit configuration; };
}; };
}; };
emptyValue = { emptyValue = {