core/lib/tests/modules/submoduleFiles.nix

22 lines
403 B
Nix
Raw Permalink Normal View History

2024-05-01 22:14:04 +00:00
{ 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;
}
];
}