about summary refs log tree commit diff
path: root/ops
diff options
context:
space:
mode:
Diffstat (limited to 'ops')
-rw-r--r--ops/nixos/paroxysm.nix25
-rw-r--r--ops/nixos/whitby/default.nix4
2 files changed, 29 insertions, 0 deletions
diff --git a/ops/nixos/paroxysm.nix b/ops/nixos/paroxysm.nix
new file mode 100644
index 000000000000..faf61f77a07d
--- /dev/null
+++ b/ops/nixos/paroxysm.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+
+let
+  cfg = config.services.depot.paroxysm;
+  description = "TVL's majestic IRC bot";
+in {
+  options.services.depot.paroxysm.enable = lib.mkEnableOption description;
+
+  config = lib.mkIf cfg.enable {
+    systemd.services.paroxysm = {
+      inherit description;
+      script = "${config.depot.fun.paroxysm}/bin/paroxysm";
+
+      environment = {
+        PARX_DATABASE_URL = "postgresql://tvldb:tvldb@localhost/tvldb";
+        PARX_IRC_CONFIG_PATH = "/var/lib/paroxysm/irc.toml";
+      };
+
+      serviceConfig = {
+        DynamicUser = true;
+        StateDirectory = "paroxysm";
+      };
+    };
+  };
+}
diff --git a/ops/nixos/whitby/default.nix b/ops/nixos/whitby/default.nix
index f28e8789f821..9c0bc2e2836a 100644
--- a/ops/nixos/whitby/default.nix
+++ b/ops/nixos/whitby/default.nix
@@ -19,6 +19,7 @@ in lib.fix(self: {
     "${depot.depotPath}/ops/nixos/depot.nix"
     "${depot.depotPath}/ops/nixos/monorepo-gerrit.nix"
     "${depot.depotPath}/ops/nixos/panettone.nix"
+    "${depot.depotPath}/ops/nixos/paroxysm.nix"
     "${depot.depotPath}/ops/nixos/smtprelay.nix"
     "${depot.depotPath}/ops/nixos/sourcegraph.nix"
     "${depot.depotPath}/ops/nixos/tvl-slapd/default.nix"
@@ -223,6 +224,9 @@ in lib.fix(self: {
       dbName = "panettone";
       secretsFile = "/etc/secrets/panettone";
     };
+
+    # Run the first cursed bot (quote bot)
+    paroxysm.enable = true;
   };
 
   services.postgresql = {