citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

default.nix (557B)


      1 extra:
      2 { config, lib, pkgs, ... }:
      3 let cfg = extra.private;
      4 in
      5 {
      6   systemd.services.bandcamp-sales-bot = {
      7     description = "bandcamp sales bot";
      8 
      9     environment = {
     10       BANDCAMP_USER = cfg.bandcamp-user;
     11       BANDCAMP_PASS = cfg.bandcamp-pass;
     12       AWS_ACCESS_KEY_ID = cfg.aws_access_key;
     13       AWS_SECRET_ACCESS_KEY = cfg.aws_secret_key;
     14     };
     15 
     16     serviceConfig.ExecStart = "${extra.import-scripts}/bin/bandcamp-sales-bot";
     17     unitConfig.OnFailure = "notify-failed@%n.service";
     18 
     19     # 3rd day of each month
     20     startAt = "*-*-03 8:30:00";
     21   };
     22 }