core/lib/tests/modules/submoduleFiles.nix
2024-06-30 09:12:46 +01:00

26 lines
444 B
Nix

{ lib, ... }:
{
options.submodule = lib.mkOption {
default = { };
type = lib.types.submoduleWith {
modules = [
(
{ options, ... }:
{
options.value = lib.mkOption { };
options.internalFiles = lib.mkOption { default = options.value.files; };
}
)
];
};
};
imports = [
{
_file = "the-file.nix";
submodule.value = 10;
}
];
}