core/lib/tests/modules/emptyValues.nix

26 lines
789 B
Nix
Raw Normal View History

2024-05-01 22:14:04 +00:00
{ lib, ... }:
let
inherit (lib) types;
2024-06-30 08:16:52 +00:00
in
{
2024-05-01 22:14:04 +00:00
options = {
2024-06-30 08:16:52 +00:00
int = lib.mkOption { type = types.lazyAttrsOf types.int; };
list = lib.mkOption { type = types.lazyAttrsOf (types.listOf types.int); };
nonEmptyList = lib.mkOption { type = types.lazyAttrsOf (types.nonEmptyListOf types.int); };
attrs = lib.mkOption { type = types.lazyAttrsOf (types.attrsOf types.int); };
null = lib.mkOption { type = types.lazyAttrsOf (types.nullOr types.int); };
submodule = lib.mkOption { type = types.lazyAttrsOf (types.submodule { }); };
2024-05-01 22:14:04 +00:00
};
config = {
int.a = lib.mkIf false null;
list.a = lib.mkIf false null;
nonEmptyList.a = lib.mkIf false null;
attrs.a = lib.mkIf false null;
null.a = lib.mkIf false null;
submodule.a = lib.mkIf false null;
};
}