diff options
Diffstat (limited to 'nixpkgs/lib/tests/modules/declare-attrsOfSub-any-enable.nix')
-rw-r--r-- | nixpkgs/lib/tests/modules/declare-attrsOfSub-any-enable.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/lib/tests/modules/declare-attrsOfSub-any-enable.nix b/nixpkgs/lib/tests/modules/declare-attrsOfSub-any-enable.nix new file mode 100644 index 00000000000..986d07227e1 --- /dev/null +++ b/nixpkgs/lib/tests/modules/declare-attrsOfSub-any-enable.nix @@ -0,0 +1,29 @@ +{ lib, ... }: + +let + submod = { ... }: { + options = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Some descriptive text + ''; + }; + }; + }; +in + +{ + options = { + attrsOfSub = lib.mkOption { + default = {}; + example = {}; + type = lib.types.attrsOf (lib.types.submodule [ submod ]); + description = '' + Some descriptive text + ''; + }; + }; +} |