From a22a0346524910c596f97aba955b7346b7479c2d Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 7 Apr 2022 21:44:23 +0200 Subject: flora: fix the trainspotter script --- flora/services/trainspotter.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 flora/services/trainspotter.nix (limited to 'flora/services/trainspotter.nix') diff --git a/flora/services/trainspotter.nix b/flora/services/trainspotter.nix new file mode 100644 index 0000000..5b81f7e --- /dev/null +++ b/flora/services/trainspotter.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +{ + systemd.services.trainspotter = { + enable = true; + description = "script watching the ilztalbahn gtfs for changes"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig.Type = "simple"; + path = with pkgs; [ curl libzip mailutils ]; + script = '' + ${pkgs.gauche}/bin/gosh ${pkgs.copyPathToStore ./trainspotter.scm} + ''; + startAt = "daily"; + }; + +} -- cgit v1.2.3