core/lib/tests/modules/disable-module-with-key.nix

35 lines
605 B
Nix
Raw Normal View History

2024-05-01 22:14:04 +00:00
{ lib, ... }:
let
inherit (lib) mkOption types;
moduleWithKey = {
key = "disable-module-with-key.nix#moduleWithKey";
config = {
enable = true;
};
};
in
{
options = {
positive = mkOption {
type = types.submodule {
imports = [
./declare-enable.nix
moduleWithKey
];
};
2024-06-30 08:16:52 +00:00
default = { };
2024-05-01 22:14:04 +00:00
};
negative = mkOption {
type = types.submodule {
imports = [
./declare-enable.nix
moduleWithKey
];
disabledModules = [ moduleWithKey ];
};
2024-06-30 08:16:52 +00:00
default = { };
2024-05-01 22:14:04 +00:00
};
};
}