diff options
author | makefu <github@syntax-fehler.de> | 2017-07-02 23:08:09 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-07-02 23:08:09 +0200 |
commit | 5c26d65ae48aa73c8a738e4ef22dcb3ad6daa00d (patch) | |
tree | 96e39ada11c4a9dca161f0612727c2ce98197a74 /krebs | |
parent | b4bcf2b0a4dd5fbc69a4b539b32f82fb3eccc4a2 (diff) |
urlwatch: filter _module with kv
before this commit { url= ...; filter=... } didn't work because
the result contained _module
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/urlwatch.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 380e30ae3..463fa26ba 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -60,6 +60,7 @@ let description = "URL to watch."; example = [ https://nixos.org/channels/nixos-unstable/git-revision + { url = http://localhost ; filter = "grep:important.*stuff"; } ]; apply = map (x: getAttr (typeOf x) { set = x; @@ -79,7 +80,8 @@ let }; urlsFile = pkgs.writeText "urls" - (concatMapStringsSep "\n---\n" toJSON cfg.urls); + (concatMapStringsSep "\n---\n" + (x: toJSON (filterAttrs (n: v: n != "_module") x)) cfg.urls); hooksFile = cfg.hooksFile; |