From 32e433123c0e68a7db452d68b456f8d0cceb6ad8 Mon Sep 17 00:00:00 2001
From: Nathan McCarty <thatonelutenist@stranger.systems>
Date: Thu, 27 Mar 2025 15:15:06 -0400
Subject: [PATCH] Switch to conduwuit

---
 nixos/machines/driftwood/containers/conduit.nix | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/nixos/machines/driftwood/containers/conduit.nix b/nixos/machines/driftwood/containers/conduit.nix
index df8b731..7d66cce 100644
--- a/nixos/machines/driftwood/containers/conduit.nix
+++ b/nixos/machines/driftwood/containers/conduit.nix
@@ -2,9 +2,10 @@
   config,
   lib,
   pkgs,
+  inputs,
   ...
 }: {
-  containers.conduit = {
+  containers.conduit-stranger-systems = {
     autoStart = true;
     privateNetwork = true;
     hostAddress = "192.168.100.10";
@@ -17,6 +18,7 @@
         isReadOnly = false;
       };
     };
+    nixpkgs = inputs.nixpkgs-unstable.outPath;
     config = {
       config,
       lib,
@@ -24,13 +26,16 @@
       ...
     }: {
       # Conduit proper
-      services.matrix-conduit = {
+      services.conduwuit = {
         enable = true;
         settings.global = {
           server_name = "stranger.systems";
-          allow_registration = false;
-          port = 6167;
-          address = "0.0.0.0";
+          rocksdb_optimize_for_spinning_disks = true;
+new_user_displayname_suffix = "";
+          allow_registration = true;
+          registration_token_file = "/var/lib/conduwuit/reg_token";
+          port = [6167];
+          address = ["0.0.0.0"];
         };
       };
       # Open the port