From 1c8d58b54c1162b0b02731592fa57175279e5369 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Fri, 18 Aug 2023 04:47:01 +0200 Subject: Conduit reg token --- host/Rory-nginx/services/matrix/conduit.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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! } -- cgit 1.4.1