{ 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";
  };

}