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