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