Enable mautrix-whatsapp bridge

This commit is contained in:
Jordan Holt 2024-07-20 12:55:08 +01:00
parent 151d60f329
commit c17ee693dc
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520
3 changed files with 15 additions and 2 deletions

View File

@ -65,6 +65,9 @@
matrix-synapse = { matrix-synapse = {
enable = true; enable = true;
usePostgresql = databases.postgresql.enable; usePostgresql = databases.postgresql.enable;
bridges = [
"whatsapp"
];
}; };
nginx.enable = true; nginx.enable = true;
photoprism.enable = true; photoprism.enable = true;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, inputs, ... }:
let cfg = config.modules.desktop.browsers.firefox; let cfg = config.modules.desktop.browsers.firefox;
in { in {

View File

@ -62,11 +62,16 @@ in {
}; };
permissions = { permissions = {
"${cfg.serverName}" = "user"; "${cfg.serverName}" = "user";
"@jordan:vimium.com" = "admin";
}; };
provisioning = { provisioning = {
shared_secret = "disable"; shared_secret = "disable";
}; };
}; };
homeserver = {
address = "https://matrix.${cfg.serverName}";
domain = cfg.serverName;
};
}; };
matrixClientConfig = { matrixClientConfig = {
"m.homeserver" = { "m.homeserver" = {
@ -175,8 +180,13 @@ in {
max_upload_size = "100M"; max_upload_size = "100M";
report_stats = false; report_stats = false;
server_name = cfg.serverName; server_name = cfg.serverName;
app_service_config_files = (lib.optional (lib.elem "mautrix-whatsapp" cfg.bridges)
"/var/lib/mautrix-whatsapp/whatsapp-registration.yaml");
}; };
}; };
systemd.services.matrix-synapse.serviceConfig.SupplementaryGroups =
(lib.optional (lib.elem "mautrix-whatsapp" cfg.bridges)
config.systemd.services.mautrix-whatsapp.serviceConfig.Group);
services.postgresql = lib.mkIf cfg.usePostgresql { services.postgresql = lib.mkIf cfg.usePostgresql {
ensureUsers = [ ensureUsers = [
@ -203,7 +213,7 @@ in {
backfill = true; backfill = true;
max_initial_conversations = -1; max_initial_conversations = -1;
message_count = 50; message_count = 50;
request_full_sync = false; request_full_sync = true;
}; };
mute_bridging = true; mute_bridging = true;
}; };