core/lib/tests/modules/declare-submoduleWith-shorthand.nix

17 lines
287 B
Nix
Raw Normal View History

2024-06-30 08:16:52 +00:00
{ lib, ... }:
let
2024-05-01 22:14:04 +00:00
sub.options.config = lib.mkOption {
type = lib.types.bool;
default = false;
};
2024-06-30 08:16:52 +00:00
in
{
2024-05-01 22:14:04 +00:00
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [ sub ];
shorthandOnlyDefinesConfig = true;
};
2024-06-30 08:16:52 +00:00
default = { };
2024-05-01 22:14:04 +00:00
};
}