citadel

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

default.nix (652B)


      1 extra:
      2 { config, lib, pkgs, ... }:
      3 {
      4   systemd.user.services.tunecore-sales-bot = {
      5     description = "tc sales bot";
      6 
      7     wantedBy = [ "default.target" ];
      8     after    = [ "default.target" ];
      9 
     10     environment = {
     11       TUNECORE_USER = extra.private.tc-user;
     12       TUNECORE_PASS = extra.private.tc-pass;
     13       AWS_ACCESS_KEY_ID = extra.private.aws_access_key;
     14       AWS_SECRET_ACCESS_KEY = extra.private.aws_secret_key;
     15     };
     16 
     17     serviceConfig.ExecStart = "${extra.import-scripts}/bin/tunecore-sales-bot daily-check";
     18     unitConfig.OnFailure = "notify-failed@%n.service";
     19 
     20     # monthly, first tuesday
     21     startAt = "Tue *-*-1..7 10:30:00";
     22   };
     23 }
     24