lib/tests: Add submoduleWith tests

This commit is contained in:
Silvan Mosberger
2020-01-01 01:11:45 +01:00
parent eec83d41e3
commit cc81320a46
8 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
{ lib, ... }: {
options.submodule = lib.mkOption {
type = lib.types.submoduleWith {
modules = [
{
options.inner = lib.mkOption {
type = lib.types.bool;
default = false;
};
}
{
outer = true;
}
];
};
default = {};
};
config.submodule = lib.mkMerge [
({ lib, ... }: {
options.outer = lib.mkOption {
type = lib.types.bool;
default = false;
};
})
{
inner = true;
}
];
}