mergeModules
lib.modules.mergeModules
Merge a list of modules. This will recurse over the option declarations in all modules, combining them into a single set. At the same time, for each option declaration, it will merge the corresponding option definitions in all machines, returning them in the ‘value’ attribute of each option.
This returns a set like { # A recursive set of options along with their final values matchedOptions = { foo = { _type = "option"; value = "option value of foo"; ... }; bar.baz = { _type = "option"; value = "option value of bar.baz"; ... }; ... }; # A list of definitions that weren't matched by any option unmatchedDefns = [ { file = "file.nix"; prefix = [ "qux" ]; value = "qux"; } ... ]; }
Inputs
prefix
-
1. Function argument
modules
-
2. Function argument
Noogle detected
Implementation
The following is the current implementation of this function.
mergeModules = prefix: modules:
mergeModules' prefix modules
(concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);