summaryrefslogtreecommitdiffstats
path: root/lib/tests/modules/declare-attrsOfSub-any-enable.nix
blob: fc952dd23836c914003356f90f2b4131756c3971 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ 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
      '';
    };
  };
}