Skip to content

Commit

Permalink
Migrate triggers and pomo to cs306
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondburned committed Oct 5, 2023
1 parent 8f34062 commit 151e083
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
File renamed without changes.
File renamed without changes.
Binary file modified secrets/terraform.tfstate
Binary file not shown.
Binary file modified secrets/terraform.tfstate.backup
Binary file not shown.
File renamed without changes.
32 changes: 1 addition & 31 deletions servers/cirno/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,40 +52,10 @@ in
};
};

systemd.services.triggers = {
enable = true;
description = "Triggers (Crying Counter) Discord bot";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
environment = import ./secrets/triggers-env.nix;
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.triggers}/bin/triggers";
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
};
};

systemd.services.pomo = {
enable = true;
description = "Pomodoro timer server/Discord bot";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
environment = import ./secrets/pomo.nix;
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.pomo}/bin/pomo";
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
};
};

systemd.services.sendlimiter =
let
extraArgs = [];
secrets = import ./secrets/sendlimiter.nix;
secrets = import <acm-aws/secrets/sendlimiter.nix>;
args = lib.concatStringsSep
" "
(map lib.escapeShellArg (extraArgs ++ secrets.channelIDs));
Expand Down
32 changes: 31 additions & 1 deletion servers/cs306/services.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
imports = [
./caddy
];
];

systemd.services.quizler = {
enable = true;
Expand All @@ -30,4 +30,34 @@
RestrictNetworkInterfaces = "lo"; # enough for localhost
};
};

systemd.services.triggers = {
enable = true;
description = "Triggers (Crying Counter) Discord bot";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
environment = import <acm-aws/secrets/triggers-env.nix>;
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.triggers}/bin/triggers";
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
};
};

systemd.services.pomo = {
enable = true;
description = "Pomodoro timer server/Discord bot";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
environment = import <acm-aws/secrets/pomo.nix>;
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.pomo}/bin/pomo";
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
};
};
}

0 comments on commit 151e083

Please sign in to comment.