nixos-config/config/services/mautrix-whatsapp.nix

63 lines
1.3 KiB
Nix
Raw Normal View History

2024-06-26 05:11:44 +00:00
{
config,
pkgs,
...
}: {
2022-05-03 19:25:44 +00:00
imports = [
../../modules/matrix/mautrix-whatsapp.nix
];
services.mautrix-whatsapp = {
enable = true;
2024-06-26 05:11:44 +00:00
environmentFile = config.sops.secrets."services/mautrix/shared_secret".path;
2022-05-03 19:25:44 +00:00
settings = {
homeserver = {
2023-04-18 18:28:10 +00:00
address = "https://matrix.chir.rs";
2022-05-03 19:25:44 +00:00
domain = "chir.rs";
async_media = true;
2022-05-03 19:25:44 +00:00
};
appservice = {
2024-10-27 05:50:41 +00:00
max_body_size = 10;
2022-05-03 19:25:44 +00:00
};
metrics = {
enabled = true;
listen = "[::]:29319";
};
2024-10-27 05:50:41 +00:00
database = {
type = "postgres";
uri = "postgres:///mautrix_whatsapp?sslmode=disable&host=/run/postgresql";
};
2022-05-03 19:25:44 +00:00
bridge = {
2024-10-27 05:50:41 +00:00
relay.enabled = true;
2022-05-03 19:25:44 +00:00
permissions = {
2023-03-21 19:33:25 +00:00
"*" = "relay";
2024-05-17 07:05:12 +00:00
"@miifox:chir.rs" = "user";
2022-05-03 19:25:44 +00:00
"@lotte:chir.rs" = "admin";
};
2024-10-27 05:50:41 +00:00
};
matrix = {
delivery_receipts = true;
};
backfill = {
enabled = true;
};
encryption = {
allow = true;
default = false;
appservice = true;
allow_key_sharing = true;
};
double_puppet = {
secrets = {
2024-06-26 05:11:44 +00:00
"chir.rs" = "as_token:$SHARED_AS_TOKEN";
};
2022-05-03 19:25:44 +00:00
};
};
};
2024-06-26 05:11:44 +00:00
sops.secrets."services/mautrix/shared_secret" = {};
2022-05-03 19:25:44 +00:00
services.postgresql.ensureDatabases = [
"mautrix_whatsapp"
];
}