diff --git a/lib/default.nix b/lib/default.nix index c1549aa..e077f7f 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -2,6 +2,18 @@ rec { mkFqdn = _: cfg: cfg.networking.fqdn; + probesWithTag = + { + name, + value ? null, + }: + probesConfig: + lib.filterAttrs ( + k: v: lib.any (tag: tag.name == name && (value == null || tag.value == value)) v.tags + ) probesConfig.monitors; + + probesWithType = type: probesConfig: lib.filterAttrs (_: v: v.type == type) probesConfig.monitors; + fromHive = { builder,