1{ config, lib, ... }:
2{
3
4 options.theType = lib.mkOption {
5 type = lib.types.optionType;
6 };
7
8 options.theOption = lib.mkOption {
9 type = config.theType;
10 };
11
12 config.theType = lib.mkMerge [
13 (lib.types.submodule {
14 options.int = lib.mkOption {
15 type = lib.types.int;
16 default = 10;
17 };
18 })
19 (lib.types.submodule {
20 options.str = lib.mkOption {
21 type = lib.types.str;
22 };
23 })
24 ];
25
26 config.theOption.str = "hello";
27
28}