summaryrefslogtreecommitdiffstats
path: root/lib/tests/modules/declare-submoduleWith-shorthand.nix
blob: 8d9d9195cda7ef044e302f5d05ecd42e57735360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ lib, ... }:
let
  sub.options.config = lib.mkOption {
    type = lib.types.bool;
    default = false;
  };
in
{
  options.submodule = lib.mkOption {
    type = lib.types.submoduleWith {
      modules = [ sub ];
      shorthandOnlyDefinesConfig = true;
    };
    default = { };
  };
}