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

20 lines
344 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 {
type = lib.types.submoduleWith {
modules = [
2024-06-30 08:16:52 +00:00
(
{ lib, ... }:
{
options.foo = lib.mkOption { default = lib.foo; };
}
)
2024-05-01 22:14:04 +00:00
];
specialArgs.lib = lib // {
foo = "foo";
};
};
2024-06-30 08:16:52 +00:00
default = { };
2024-05-01 22:14:04 +00:00
};
}