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 = {
enable = true;
usePostgresql = databases.postgresql.enable;
bridges = [
"whatsapp"
];
};
nginx.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;
in {

View File

@ -62,11 +62,16 @@ in {
};
permissions = {
"${cfg.serverName}" = "user";
"@jordan:vimium.com" = "admin";
};
provisioning = {
shared_secret = "disable";
};
};
homeserver = {
address = "https://matrix.${cfg.serverName}";
domain = cfg.serverName;
};
};
matrixClientConfig = {
"m.homeserver" = {
@ -175,8 +180,13 @@ in {
max_upload_size = "100M";
report_stats = false;
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 {
ensureUsers = [
@ -203,7 +213,7 @@ in {
backfill = true;
max_initial_conversations = -1;
message_count = 50;
request_full_sync = false;
request_full_sync = true;
};
mute_bridging = true;
};