1{ lib, ... }: {
2 options.submodule = lib.mkOption {
3 type = lib.types.submoduleWith {
4 modules = [
5 {
6 options.inner = lib.mkOption {
7 type = lib.types.bool;
8 default = false;
9 };
10 }
11 ];
12 };
13 default = {};
14 };
15
16 config.submodule = lib.mkMerge [
17 ({ lib, ... }: {
18 options.outer = lib.mkOption {
19 type = lib.types.bool;
20 default = false;
21 };
22 })
23 {
24 inner = true;
25 outer = true;
26 }
27 ];
28}