diff options
Diffstat (limited to 'lib/tests/modules/declare-submodule-via-evalModules.nix')
-rw-r--r-- | lib/tests/modules/declare-submodule-via-evalModules.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/tests/modules/declare-submodule-via-evalModules.nix b/lib/tests/modules/declare-submodule-via-evalModules.nix new file mode 100644 index 000000000000..2841c64a073d --- /dev/null +++ b/lib/tests/modules/declare-submodule-via-evalModules.nix @@ -0,0 +1,28 @@ +{ lib, ... }: { + options.submodule = lib.mkOption { + inherit (lib.evalModules { + modules = [ + { + options.inner = lib.mkOption { + type = lib.types.bool; + default = false; + }; + } + ]; + }) type; + default = {}; + }; + + config.submodule = lib.mkMerge [ + ({ lib, ... }: { + options.outer = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }) + { + inner = true; + outer = true; + } + ]; +} |