summaryrefslogtreecommitdiff
path: root/flora/services/urlwatcher.nix
blob: 56e043a2904bd38d5620e32a1f45d63171e3b3f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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";
    };
  };
}