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