From 8527caef164fe872dd9c77772d1e6ed7a0a85b77 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 00:02:54 +0200 Subject: tv urlwatch: add exec --- tv/2configs/urlwatch.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'tv') diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index b2364e6e6..378b5d167 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,19 +1,15 @@ with import ; { 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; -- cgit v1.2.3