diff options
author | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
commit | 060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch) | |
tree | 2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/2configs/bureautomation/comic-updater.nix | |
parent | cbfcc890e3b76d942b927809bf981a5fa7289e6a (diff) |
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/2configs/bureautomation/comic-updater.nix')
-rw-r--r-- | makefu/2configs/bureautomation/comic-updater.nix | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/makefu/2configs/bureautomation/comic-updater.nix b/makefu/2configs/bureautomation/comic-updater.nix deleted file mode 100644 index 5804d66d2..000000000 --- a/makefu/2configs/bureautomation/comic-updater.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, pkgs, buildPythonPackage, ... }: - -let - mq = "192.168.8.11"; - pkg = pkgs.ampel; -in { - systemd.services.comic-updater = { - startAt = "daily"; - description = "update our comics"; - after = [ "network-online.target" ] ++ (lib.optional config.services.mosquitto.enable "mosquitto.service"); - path = with pkgs; [ wget xmlstarlet ]; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - # User = "hass"; - #WorkingDirectory = config.services.home-assistant.configDir; - WorkingDirectory = "/var/lib/homeassistant-docker"; - ExecStart = pkgs.writeDash "update-comics" '' - set -euf - mkdir -p www/ - cd www/ - # poorly drawn lines - pic=$(wget -O- http://www.poorlydrawnlines.com/feed/ \ - | xml sel -t -v '/rss/channel/item/content:encoded' \ - | head -n 2 | sed -n 's/.*src="\([^"]\+\)".*/\1/p' ) - wget "$pic" -nc && cp -v "$(basename "$pic")" lines.png - - #pic=$(curl -L xkcd.com 2>/dev/null | grep imgs.xkcd.com | grep title | sed -n 's/.*src="\([^"]\+\)" .*/https:\1/p') - # xkcd - pic=$(wget -O- https://xkcd.com/rss.xml \ - | xml sel -t -v '/rss/channel/item/description' \ - | head -n 1 | sed -n 's/.*src="\([^"]\+\)".*/\1/p' ) - wget "$pic" -nc && cp -v "$(basename "$pic")" xkcd.png - ''; - PrivateTmp = true; - }; - }; -} |