summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-02-02 15:21:52 +0100
committertv <tv@krebsco.de>2023-02-02 15:25:55 +0100
commit38062bf06659e3ad9b2427c2049aa3ccce47c24c (patch)
tree6bb2b123bdc50185585565c9468db4f5ce625c84 /krebs/3modules
parent9316f445b62fbe9f92f8bf41c8c3780cd323839b (diff)
urlwatch: admit dict-based filter lists
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/urlwatch.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix
index 2e336de21..e08289bbc 100644
--- a/krebs/3modules/urlwatch.nix
+++ b/krebs/3modules/urlwatch.nix
@@ -71,7 +71,7 @@ let
description = "URL to watch.";
example = [
https://nixos.org/channels/nixos-unstable/git-revision
- { url = http://localhost ; filter = "grep:important.*stuff"; }
+ { url = http://localhost ; filter = [ (grep "important.*stuff") ]; }
];
apply = map (x: getAttr (typeOf x) {
set = x;
@@ -211,7 +211,9 @@ let
};
filter = mkOption {
default = null;
- type = with types; nullOr str; # TODO nullOr subtypes.filter
+ type =
+ with types;
+ nullOr (either str (listOf (pkgs.formats.json {}).type));
};
ignore_cached = mkOption {
default = null;