1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-24 02:00:41 +03:00
nixpkgs/lib/tests/modules/assertions/trigger-submodule.nix
2020-11-30 23:51:23 +01:00

18 lines
350 B
Nix

{ lib, ... }: {
options.foo = lib.mkOption {
default = { bar = {}; };
type = lib.types.attrsOf (lib.types.submodule {
options.baz = lib.mkOption {
default = true;
};
});
};
config._module.assertions.test = {
enable = true;
message = "Assertion failed";
triggerPath = [ "foo" "bar" "baz" ];
};
}