at 24.11-pre 732 B view raw
1{ lib, ... }: 2let 3 inherit (lib) mkOption types; 4 5 moduleWithoutKey = { 6 config = { 7 raw = "pear"; 8 }; 9 }; 10 11 moduleWithKey = { 12 key = __curPos.file + "#moduleWithKey"; 13 config = { 14 raw = "pear"; 15 }; 16 }; 17 18 decl = { 19 options = { 20 raw = mkOption { 21 type = types.lines; 22 }; 23 }; 24 }; 25in 26{ 27 options = { 28 once = mkOption { 29 type = types.submodule { 30 imports = [ 31 decl 32 moduleWithKey 33 moduleWithKey 34 ]; 35 }; 36 default = {}; 37 }; 38 twice = mkOption { 39 type = types.submodule { 40 imports = [ 41 decl 42 moduleWithoutKey 43 moduleWithoutKey 44 ]; 45 }; 46 default = {}; 47 }; 48 }; 49}