summary refs log tree commit diff
path: root/host
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-18 04:47:01 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-18 04:47:01 +0200
commit1c8d58b54c1162b0b02731592fa57175279e5369 (patch)
treea2365d93a061a32ba57345f5eae01690f7fb03be /host
parentFix conduit path (diff)
downloadRory-Open-Architecture-1c8d58b54c1162b0b02731592fa57175279e5369.tar.xz
Conduit reg token
Diffstat (limited to 'host')
-rwxr-xr-xhost/Rory-nginx/services/matrix/conduit.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/host/Rory-nginx/services/matrix/conduit.nix b/host/Rory-nginx/services/matrix/conduit.nix
index 4916a0c..38a2d3d 100755
--- a/host/Rory-nginx/services/matrix/conduit.nix
+++ b/host/Rory-nginx/services/matrix/conduit.nix
@@ -11,8 +11,21 @@
       enable_lightning_bolt = true;
       max_concurrent_requests = 1000;
       allow_check_for_updates = false;
+      allow_registration = true;
     };
   };
+  systemd.services.matrix-conduit-reg-token = {
+      description = "Random registration token for Conduit.";
+      before = ["matrix-synapse.service"]; # So the registration can be used by Conduit.
+      after = ["matrix-synapse-reg-token.service"];
+
+      script = ''
+        echo Environment=CONDUIT_REGISTRATION_TOKEN=$(cat /var/lib/matrix-synapse/registration_shared_secret.txt) > /run/systemd/system/conduit.service.d/override.conf'';
+      serviceConfig = {
+        User = "root";
+        Group = "root";
+      };
+    };
   system.stateVersion = "22.11"; # DO NOT EDIT!
 }