default.nix (1126B)
1 extra: 2 { config, lib, pkgs, ... }: 3 let util = extra.util; 4 import-scripts = extra.import-scripts; 5 countries = pkgs.fetchurl { 6 url = "https://jb55.com/s/8536f14537bbb417.csv"; 7 sha256 = "9c31690e31f5a26b12bc5a16d3a1508a06ac1d842e4a129868bc7aaf33358ab5"; 8 }; 9 in 10 { 11 systemd.user.services.itunes-sales-bot = { 12 description = "itunes sales bot"; 13 14 wantedBy = [ "default.target" ]; 15 after = [ "default.target" ]; 16 17 environment = { 18 ISO_3166_COUNTRIES = countries; 19 }; 20 21 serviceConfig.ExecStart = "${import-scripts}/bin/itunes-sales-bot"; 22 unitConfig.OnFailure = "notify-failed-user@%n.service"; 23 24 # First tuesday of every month @ 1600 25 startAt = "Tue *-*-1..7 11:30:00"; 26 }; 27 28 systemd.user.services.itunes-transaction-bot = { 29 description = "itunes transaction bot"; 30 31 wantedBy = [ "default.target" ]; 32 after = [ "default.target" ]; 33 34 serviceConfig.ExecStart = "${import-scripts}/bin/itunes-transaction-bot"; 35 unitConfig.OnFailure = "notify-failed-user@%n.service"; 36 37 # First tuesday of every month @11 38 startAt = "Tue *-*-1..7 11:00:00"; 39 }; 40 }