about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/matrix-moderation.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/modules/services/matrix-moderation.nix b/modules/services/matrix-moderation.nix
index f2b76eb..7bb4c14 100644
--- a/modules/services/matrix-moderation.nix
+++ b/modules/services/matrix-moderation.nix
@@ -15,17 +15,22 @@ in
   };
 
   config = mkIf cfg.enable {
-
     services.mjolnir = {
       enable = true;
-      homeserverUrl = "https://${cfg.realHost}";
+      homeserverUrl = "http://127.0.0.1:8008";
       pantalaimon.enable = true;
+      # NOTE: this option currently has no effect
+      pantalaimon.options = {
+        listenAddress = "127.0.0.1";
+        listenPort = 8011;
+      };
       pantalaimon.username = "abuse";
       pantalaimon.passwordFile = cfg.secrets.userPassword;
       managementRoom = "#moderation:${cfg.domain}";
 
       settings = {
-        homeserverUrl = "http://127.0.0.1:8009";
+        # TODO: get rid of hardcoded values
+        homeserverUrl = "http://127.0.0.1:8011";
         automaticallyRedactForReasons = [
           "spam"
           "advertising"
@@ -34,7 +39,14 @@ in
       };
     };
 
-    systemd.services.mjolnir.after = [ "dendrite.service" ];
+    # TODO: get rid of hardcoded values
+    systemd.services.mjolnir.after = [ "matrix-synapse.service" ];
+
+    # Override the pantalaimon options, since the mjolnir one is broken
+    services.pantalaimon-headless.instances."mjolnir" = {
+      listenAddress = "127.0.0.1";
+      listenPort = 8011;
+    };
 
     environment.persistence."/persist".directories = [
       "/var/lib/private/pantalaimon-mjolnir"