From da840e09be40989171c14120177df14a22780e33 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 12 Nov 2023 16:46:41 +0900 Subject: feat(modules/matrix-bridge): support new homeserver --- modules/services/matrix-bridge.nix | 23 ++++++++++++----------- modules/services/matrix-homeserver.nix | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'modules') diff --git a/modules/services/matrix-bridge.nix b/modules/services/matrix-bridge.nix index 061a812..adf7143 100644 --- a/modules/services/matrix-bridge.nix +++ b/modules/services/matrix-bridge.nix @@ -20,7 +20,7 @@ in services.mautrix-telegram = { enable = true; environmentFile = cfg.secrets.mautrix-envs; - serviceDependencies = [ "dendrite.service" ]; + serviceDependencies = [ "matrix-synapse.service" ]; settings = { homeserver.address = "https://${cfg.realHost}"; @@ -58,7 +58,7 @@ in services.mautrix-signal = { enable = true; environmentFile = cfg.secrets.mautrix-envs; - serviceDependencies = [ "dendrite.service" ]; + serviceDependencies = [ "matrix-synapse.service" ]; settings = { homeserver.address = "https://${cfg.realHost}"; @@ -101,7 +101,7 @@ in services.mautrix-whatsapp = { enable = true; environmentFile = cfg.secrets.mautrix-envs; - serviceDependencies = [ "dendrite.service" ]; + serviceDependencies = [ "matrix-synapse.service" ]; settings = { homeserver.address = "https://${cfg.realHost}"; @@ -185,15 +185,16 @@ in } ]; - systemd.services.dendrite = { - serviceConfig.SupplementaryGroups = [ "mautrix-telegram" "mautrix-signal" "mautrix-whatsapp" ]; - }; + systemd.services.matrix-synapse.serviceConfig.LoadCredential = [ + "mautrix-telegram:/var/lib/mautrix-telegram/telegram-registration.yaml" + "mautrix-signal:/var/lib/mautrix-signal/signal-registration.yaml" + "mautrix-whatsapp:/var/lib/mautrix-whatsapp/whatsapp-registration.yaml" + ]; - services.dendrite.settings.app_service_api.config_files = [ - # Symlinks doesn't seem to work. Provide the actual path. - "/persist/var/lib/private/mautrix-telegram/telegram-registration.yaml" - "/persist/var/lib/private/mautrix-signal/signal-registration.yaml" - "/persist/var/lib/private/mautrix-whatsapp/whatsapp-registration.yaml" + services.matrix-synapse.settings.app_service_config_files = [ + "/run/credentials/matrix-synapse.service/mautrix-telegram" + "/run/credentials/matrix-synapse.service/mautrix-signal" + "/run/credentials/matrix-synapse.service/mautrix-whatsapp" ]; }; } diff --git a/modules/services/matrix-homeserver.nix b/modules/services/matrix-homeserver.nix index 842423d..f830ee0 100644 --- a/modules/services/matrix-homeserver.nix +++ b/modules/services/matrix-homeserver.nix @@ -10,6 +10,7 @@ let in { imports = [ + # TODO: remove obsolete module ../../overlays/sliding-sync-module.nix ]; -- cgit 1.4.1