diff options
author | sefidel <contact@sefidel.net> | 2023-11-12 10:40:40 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-11-12 17:12:53 +0900 |
commit | 6418848d748d6ce1a3de55af7da8a22802af5729 (patch) | |
tree | 86738a4fafe93ba97cc5d94170f65f30b52d7996 | |
parent | 0578bba3ab6f143402a2fbf99393e3fe1a1874cd (diff) | |
download | infra-6418848d748d6ce1a3de55af7da8a22802af5729.tar.gz infra-6418848d748d6ce1a3de55af7da8a22802af5729.zip |
feat(modules/matrix-moderation): support new homeserver
-rw-r--r-- | modules/services/matrix-moderation.nix | 20 |
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" |