~jb55/citadel

ref: 0cffe2f1a4a83c13892392e8325dff4ab05be317 citadel/nix-config/machines/archer/tunecore-sales-bot/default.nix -rw-r--r-- 652 bytes
0cffe2f1William Casarin monad: no pci hack for now 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
extra:
{ config, lib, pkgs, ... }:
{
  systemd.user.services.tunecore-sales-bot = {
    description = "tc sales bot";

    wantedBy = [ "default.target" ];
    after    = [ "default.target" ];

    environment = {
      TUNECORE_USER = extra.private.tc-user;
      TUNECORE_PASS = extra.private.tc-pass;
      AWS_ACCESS_KEY_ID = extra.private.aws_access_key;
      AWS_SECRET_ACCESS_KEY = extra.private.aws_secret_key;
    };

    serviceConfig.ExecStart = "${extra.import-scripts}/bin/tunecore-sales-bot daily-check";
    unitConfig.OnFailure = "notify-failed@%n.service";

    # monthly, first tuesday
    startAt = "Tue *-*-1..7 10:30:00";
  };
}