diff --git a/configs/urlwatch.nix b/configs/urlwatch.nix index 72ef135..fe1d605 100644 --- a/configs/urlwatch.nix +++ b/configs/urlwatch.nix @@ -29,6 +29,23 @@ let "strip" ]; } + { + name = "fxght.or.flxght"; + url = "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20"; + headers.tellonym-client = "web:0.52.0"; + filter = [ + { + shellpipe = '' + ${pkgs.jq}/bin/jq '.answers | map({ + question: .tell, + answer: .answer, + date: .createdAt, + media: .media | map(.url) + })' + ''; + } + ]; + } ]; configFile = pkgs.writeText "urlwatch.yaml" (builtins.toJSON { @@ -66,6 +83,9 @@ let # }; }; }); + urlwatch = pkgs.urlwatch.overrideAttrs (attrs: { + patches = [ ]; + }); in { users.extraUsers.urlwatch = { @@ -77,7 +97,7 @@ in enable = true; startAt = "*-*-* 05:00:00"; script = '' - ${pkgs.urlwatch}/bin/urlwatch \ + ${urlwatch}/bin/urlwatch \ --config=${lib.escapeShellArg configFile} \ --urls=${lib.escapeShellArg urlsFile} ''; diff --git a/packages/urlwatch-insecure.patch b/packages/urlwatch-insecure.patch new file mode 100644 index 0000000..67d2583 --- /dev/null +++ b/packages/urlwatch-insecure.patch @@ -0,0 +1,12 @@ +diff --git a/lib/urlwatch/storage.py b/lib/urlwatch/storage.py +index 3f6160f..03979f0 100644 +--- a/lib/urlwatch/storage.py ++++ b/lib/urlwatch/storage.py +@@ -292,7 +292,6 @@ class UrlsBaseFileStorage(BaseTextualFileStorage, metaclass=ABCMeta): + shelljob_errors = self.shelljob_security_checks() + if shelljob_errors and any(is_shell_job(job) for job in jobs): + print(('Removing shell jobs, because %s' % (' and '.join(shelljob_errors),))) +- jobs = [job for job in jobs if not is_shell_job(job)] + + return jobs +