2022-06-12 15:39:15 +00:00
|
|
|
{pkgs, ...}: {
|
2022-05-03 19:25:44 +00:00
|
|
|
imports = [
|
|
|
|
../../modules/matrix/mautrix-whatsapp.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
services.mautrix-whatsapp = {
|
|
|
|
enable = true;
|
|
|
|
environmentFile = pkgs.emptyFile;
|
|
|
|
settings = {
|
|
|
|
homeserver = {
|
2022-06-04 08:43:36 +00:00
|
|
|
address = "https://matrix.chir.rs";
|
2022-05-03 19:25:44 +00:00
|
|
|
domain = "chir.rs";
|
2022-05-28 07:43:59 +00:00
|
|
|
async_media = true;
|
2022-05-03 19:25:44 +00:00
|
|
|
};
|
|
|
|
appservice = {
|
|
|
|
database = {
|
|
|
|
type = "postgres";
|
|
|
|
uri = "postgres:///mautrix_whatsapp?sslmode=disable&host=/run/postgresql";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
metrics = {
|
|
|
|
enabled = true;
|
|
|
|
listen = "[::]:29319";
|
|
|
|
};
|
|
|
|
bridge = {
|
2022-06-04 16:03:06 +00:00
|
|
|
displayname_template = "{{if .PushName}}{{.PushName}}{{else if .BusinessName}}{{.BusinessName}}{{else}}{{.JID}}{{end}}";
|
2022-05-03 19:25:44 +00:00
|
|
|
personal_filtering_spaces = true;
|
|
|
|
delivery_receipts = true;
|
|
|
|
hystory_sync = {
|
|
|
|
backfill = true;
|
|
|
|
request_full_sync = true;
|
|
|
|
};
|
|
|
|
send_presence_on_typing = true;
|
2022-06-12 15:39:15 +00:00
|
|
|
double_puppet_server_map = {};
|
|
|
|
login_shared_secret_map = {};
|
2022-05-03 19:25:44 +00:00
|
|
|
private_chat_portal_meta = true;
|
|
|
|
mute_bridging = true;
|
|
|
|
pinned_tag = "m.favourite";
|
|
|
|
archive_tag = "m.lowpriority";
|
|
|
|
allow_user_invite = true;
|
|
|
|
disappearing_messages_in_groups = true;
|
|
|
|
url_previews = true;
|
|
|
|
encryption = {
|
|
|
|
allow = true;
|
|
|
|
};
|
|
|
|
permissions = {
|
|
|
|
"@lotte:chir.rs" = "admin";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.postgresql.ensureDatabases = [
|
|
|
|
"mautrix_whatsapp"
|
|
|
|
];
|
2022-06-12 15:39:15 +00:00
|
|
|
services.postgresql.ensureUsers = [
|
|
|
|
{
|
|
|
|
name = "mautrix-whatsapp";
|
|
|
|
ensurePermissions = {
|
|
|
|
"DATABASE mautrix_whatsapp" = "ALL PRIVILEGES";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2022-05-03 19:25:44 +00:00
|
|
|
}
|