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.wip/yesman
parent
c9cc8969b4
commit
8dea4df903
@ -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" ]; |
||||
}; |
||||
|
||||
} |
Loading…
Reference in new issue