at 23.11-beta 553 B view raw
1{ lib, ... }: 2let 3 inherit (lib) mkOption types; 4 5 moduleWithKey = { 6 key = 123; 7 config = { 8 enable = true; 9 }; 10 }; 11in 12{ 13 options = { 14 positive = mkOption { 15 type = types.submodule { 16 imports = [ 17 ./declare-enable.nix 18 moduleWithKey 19 ]; 20 }; 21 default = {}; 22 }; 23 negative = mkOption { 24 type = types.submodule { 25 imports = [ 26 ./declare-enable.nix 27 moduleWithKey 28 ]; 29 disabledModules = [ 123 ]; 30 }; 31 default = {}; 32 }; 33 }; 34}