From cc3aae94acd4509ccb1290a46c195844edec617d Mon Sep 17 00:00:00 2001 From: diamondburned Date: Mon, 11 Mar 2024 19:04:38 -0700 Subject: [PATCH] Disable fullyhacks-qrms; move some services to CS306 --- servers/cirno/services.nix | 78 +++++++++++--------------------------- servers/cs306/services.nix | 32 ++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/servers/cirno/services.nix b/servers/cirno/services.nix index 4f17219..9671aab 100644 --- a/servers/cirno/services.nix +++ b/servers/cirno/services.nix @@ -25,59 +25,27 @@ in }; }; - systemd.services.sendlimiter = - let - extraArgs = []; - secrets = import ; - args = lib.concatStringsSep - " " - (map lib.escapeShellArg (extraArgs ++ secrets.channelIDs)); - in { - enable = true; - description = "Send limiter Discord bot"; - after = [ "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; - environment = { - BOT_TOKEN = secrets.botToken; - }; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.sendlimiter}/bin/sendlimiter ${args}"; - Restart = "on-failure"; - RestartSec = "1s"; - }; - }; - - services.christmasd-test = { - enable = true; - ledPointsFile = builtins.fetchurl - "https://gist.githubusercontent.com/diamondburned/1d9a83347e153686ca192c6f5baf0b79/raw/63b06ed82fd858bdb8b15a5971df92dd4bab40c3/led-points.csv"; - extraFlags = { - http-addr = "unix://$RUNTIME_DIRECTORY/http.sock"; - }; - }; - - systemd.services."fullyhacks-qrms" = - let - tokenFile = ; - port = 38574; - in - { - enable = true; - description = "Fullyhacks QR Management System"; - after = [ "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - Type = "simple"; - DynamicUser = true; - ReadOnlyPaths = [ tokenFile ]; - StateDirectory = "fullyhacks-qrms"; - }; - script = '' - ${pkgs.fullyhacks-qrms}/bin/fullyhacks-qrms \ - --root-token-file "${tokenFile}" \ - --addr ":${builtins.toString port}" \ - --db "$STATE_DIRECTORY/database.db" - ''; - }; + # systemd.services."fullyhacks-qrms" = + # let + # tokenFile = ; + # port = 38574; + # in + # { + # enable = true; + # description = "Fullyhacks QR Management System"; + # after = [ "network-online.target" ]; + # wantedBy = [ "multi-user.target" ]; + # serviceConfig = { + # Type = "simple"; + # DynamicUser = true; + # ReadOnlyPaths = [ tokenFile ]; + # StateDirectory = "fullyhacks-qrms"; + # }; + # script = '' + # ${pkgs.fullyhacks-qrms}/bin/fullyhacks-qrms \ + # --root-token-file "${tokenFile}" \ + # --addr ":${builtins.toString port}" \ + # --db "$STATE_DIRECTORY/database.db" + # ''; + # }; } diff --git a/servers/cs306/services.nix b/servers/cs306/services.nix index fc8b463..4183060 100644 --- a/servers/cs306/services.nix +++ b/servers/cs306/services.nix @@ -95,6 +95,38 @@ in }; }; + services.christmasd-test = { + enable = true; + ledPointsFile = builtins.fetchurl + "https://gist.githubusercontent.com/diamondburned/1d9a83347e153686ca192c6f5baf0b79/raw/63b06ed82fd858bdb8b15a5971df92dd4bab40c3/led-points.csv"; + extraFlags = { + http-addr = "unix://$RUNTIME_DIRECTORY/http.sock"; + }; + }; + + systemd.services.sendlimiter = + let + extraArgs = []; + secrets = import ; + args = lib.concatStringsSep + " " + (map lib.escapeShellArg (extraArgs ++ secrets.channelIDs)); + in { + enable = true; + description = "Send limiter Discord bot"; + after = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + environment = { + BOT_TOKEN = secrets.botToken; + }; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.sendlimiter}/bin/sendlimiter ${args}"; + Restart = "on-failure"; + RestartSec = "1s"; + }; + }; + services.dischord = { enable = true; config = builtins.readFile ;