lib/modules: Remove _module.checks.*.triggerPath as it's not necessary
Previously this option was thought to be necessary to avoid infinite recursion, but it actually isn't, since the check evaluation isn't fed back into the module fixed-point.
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
{ lib, ... }: {
|
||||
|
||||
options.foo = lib.mkOption {
|
||||
default = true;
|
||||
};
|
||||
|
||||
options.bar = lib.mkOption {
|
||||
default = true;
|
||||
};
|
||||
|
||||
config._module.checks.test = {
|
||||
enable = throw "enable evaluated";
|
||||
message = "Assertion failed";
|
||||
triggerPath = [ "foo" ];
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ lib, config, ... }: {
|
||||
|
||||
options.foo = lib.mkOption {
|
||||
default = true;
|
||||
};
|
||||
|
||||
options.bar = lib.mkOption {
|
||||
default = config.foo;
|
||||
};
|
||||
|
||||
config._module.checks.foo = {
|
||||
enable = true;
|
||||
message = "Foo assertion";
|
||||
triggerPath = [ "foo" ];
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ lib, ... }: {
|
||||
options.foo = lib.mkOption {
|
||||
default = true;
|
||||
};
|
||||
|
||||
options.bar = lib.mkOption {
|
||||
default = true;
|
||||
};
|
||||
|
||||
config._module.checks.test = {
|
||||
enable = true;
|
||||
message = "Assertion failed";
|
||||
triggerPath = [ "foo" ];
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ lib, ... }: {
|
||||
|
||||
options.foo = lib.mkOption {
|
||||
default = { bar = {}; };
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
options.baz = lib.mkOption {
|
||||
default = true;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
config._module.checks.test = {
|
||||
enable = true;
|
||||
message = "Assertion failed";
|
||||
triggerPath = [ "foo" "bar" "baz" ];
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user