summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-08-13 00:02:54 +0200
committertv <tv@krebsco.de>2019-08-13 00:02:54 +0200
commit54706fe3710cc6df4623f03d0b97b070e3f49364 (patch)
treeb4e894424beaa9ed148e132fa6cb3a65c1b01acf
parent0732ecd2a565c446c895a0a68b7c436765afab69 (diff)
tv urlwatch: add exec
-rw-r--r--tv/2configs/urlwatch.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix
index b2364e6..378b5d1 100644
--- a/tv/2configs/urlwatch.nix
+++ b/tv/2configs/urlwatch.nix
@@ -1,19 +1,15 @@
with import <stockholm/lib>;
{ config, pkgs, ... }: let
- json = json' ["."];
- json' = args: url: {
+ exec = filename: args: url: {
inherit url;
- filter = "system:${pkgs.jq}/bin/jq ${
- concatMapStringsSep " " shell.escape (toList args)
+ filter = "system:${
+ concatMapStringsSep " " shell.escape ([filename] ++ toList args)
}";
};
+ json = json' ["."];
+ json' = exec "${pkgs.jq}/bin/jq";
xml = xml' ["--format" "-"];
- xml' = args: url: {
- inherit url;
- filter = "system:${pkgs.libxml2}/bin/xmllint ${
- concatMapStringsSep " " shell.escape (toList args)
- }";
- };
+ xml' = exec "${pkgs.libxml2}/bin/xmllint";
in {
krebs.urlwatch = {
enable = true;