From 6ff038b4d29ec761336c807f4a79831c99f29d67 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 7 Apr 2022 00:30:14 +0200 Subject: flora is a trainspotter now (well, a trainschedulespotter to be precise) --- flora/services/urlwatcher.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 flora/services/urlwatcher.nix (limited to 'flora/services/urlwatcher.nix') diff --git a/flora/services/urlwatcher.nix b/flora/services/urlwatcher.nix new file mode 100644 index 0000000..56e043a --- /dev/null +++ b/flora/services/urlwatcher.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +{ + systemd.services.urlwatcher-ilztal = { + enable = true; + description = "script watching the ilztalbahn gtfs for changes"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig.Type = "simple"; + path = [ pkgs.git ]; + script = '' + ${pkgs.gauche}/bin/gosh ${pkgs.copyPathToStore ./urlwatcher.scm} + ''; + }; + + systemd.timers.wikibot = { + wantedBy = [ "timers.target" ]; + timerConfig = { + Unit = "urlwatcher-ilztal.service"; + OnBootSec = "5h"; + OnActiveSec = "1d"; + }; + }; +} -- cgit v1.2.3