core/lib/tests/modules/submoduleFiles.nix

26 lines
444 B
Nix
Raw Normal View History

2024-06-30 08:16:52 +00:00
{ lib, ... }:
{
2024-05-01 22:14:04 +00:00
options.submodule = lib.mkOption {
2024-06-30 08:16:52 +00:00
default = { };
2024-05-01 22:14:04 +00:00
type = lib.types.submoduleWith {
2024-06-30 08:16:52 +00:00
modules = [
(
{ options, ... }:
{
options.value = lib.mkOption { };
2024-05-01 22:14:04 +00:00
2024-06-30 08:16:52 +00:00
options.internalFiles = lib.mkOption { default = options.value.files; };
}
)
];
2024-05-01 22:14:04 +00:00
};
};
imports = [
{
_file = "the-file.nix";
submodule.value = 10;
}
];
}