core/lib/tests/modules/declare-attrsOfSub-any-enable.nix
2024-06-30 09:12:46 +01:00

32 lines
523 B
Nix

{ 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
'';
};
};
}