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