From 6418848d748d6ce1a3de55af7da8a22802af5729 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 12 Nov 2023 10:40:40 +0900 Subject: feat(modules/matrix-moderation): support new homeserver --- modules/services/matrix-moderation.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'modules') 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" -- cgit 1.4.1