about summary refs log tree commit diff
path: root/ops/nixos/panettone.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-11-17T21·56+0100
committertazjin <mail@tazj.in>2020-11-17T22·00+0000
commit77097f8056529937ef3c970f9ee5c308665e6d5f (patch)
treec89cbb6ea733c32b96721dde634f71ee9c7d0814 /ops/nixos/panettone.nix
parentb1f2c2f48e2d83abea0a5396589a7551096a09f2 (diff)
feat(ops/panettone): Add configuration for irccat r/1880
Adds configuration options for the (inconsistently named) environment
variables that configure irccat integration with Panettone.

The defaults match the irccat setup on whitby.

Change-Id: I6857512a2e3f29f16777493eb981cc69ce3c045f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2080
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Diffstat (limited to 'ops/nixos/panettone.nix')
-rw-r--r--ops/nixos/panettone.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/ops/nixos/panettone.nix b/ops/nixos/panettone.nix
index 15ef2fbb2d..5082674357 100644
--- a/ops/nixos/panettone.nix
+++ b/ops/nixos/panettone.nix
@@ -38,6 +38,23 @@ in {
       '';
       type = types.str;
     };
+
+    irccatHost = mkOption {
+      description = "Hostname for the irccat instance";
+      type = types.str;
+      default = "localhost";
+    };
+
+    irccatPort = mkOption {
+      description = "Port for the irccat instance";
+      type = types.int;
+      default = 4722;
+    };
+
+    irccatChannel = mkOption {
+      description = "IRC channels to post to via irccat";
+      type = types.str;
+    };
   };
 
   config = lib.mkIf cfg.enable {
@@ -78,6 +95,9 @@ in {
         PGHOST = "localhost";
         PGUSER = cfg.dbUser;
         PGDATABASE = cfg.dbName;
+        IRCCATHOST = cfg.irccatHost;
+        IRCCATPORT = toString cfg.irccatPort;
+        ISSUECHANNEL = cfg.irccatChannel;
       };
     };
   };