about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--modules/services/matrix-bridge.nix23
-rw-r--r--modules/services/matrix-homeserver.nix1
-rw-r--r--systems/cobalt/default.nix4
3 files changed, 15 insertions, 13 deletions
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
   ];
 
diff --git a/systems/cobalt/default.nix b/systems/cobalt/default.nix
index b2467d5..9c5b6ba 100644
--- a/systems/cobalt/default.nix
+++ b/systems/cobalt/default.nix
@@ -284,8 +284,8 @@ in
       secrets.userPassword = config.sops.secrets.mjolnir-password.path;
     };
     services.matrix-bridge = {
-      enable = false;
-      domain = "exotic.sh";
+      enable = true;
+      domain = config.modules.services.matrix-homeserver.domain;
       secrets.mautrix-envs = config.sops.secrets.mautrix-telegram-envs.path;
     };
     services.element-web = {