767d80099c
Previously the .enable option was used to encode the condition as well, which lead to some oddness: - In order to encode an assertion, one had to invert it - To disable a check, one had to mkForce it By introducing a separate .check option this is solved because: - It can be used to encode assertions - Disabling is done separately with .enable option, whose default can be overridden without a mkForce
14 lines
269 B
Nix
14 lines
269 B
Nix
{ lib, ... }: {
|
|
|
|
options.foo = lib.mkOption {
|
|
default = { bar.baz = {}; };
|
|
type = lib.types.attrsOf (lib.types.attrsOf (lib.types.submodule {
|
|
_module.checks.test = {
|
|
check = false;
|
|
message = "Assertion failed";
|
|
};
|
|
}));
|
|
};
|
|
|
|
}
|