2022-06-12 15:39:15 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2022-05-03 20:36:55 +00:00
|
|
|
services.mautrix-signal = {
|
|
|
|
enable = true;
|
2024-06-26 05:11:44 +00:00
|
|
|
environmentFile = config.sops.secrets."services/mautrix/shared_secret".path;
|
2022-05-03 20:36:55 +00:00
|
|
|
settings = {
|
|
|
|
homeserver = {
|
2023-04-18 18:28:10 +00:00
|
|
|
address = "https://matrix.chir.rs";
|
2022-05-03 20:36:55 +00:00
|
|
|
domain = "chir.rs";
|
|
|
|
http_retry_count = 1000;
|
2023-09-08 11:41:22 +00:00
|
|
|
async_media = true;
|
2022-05-03 20:36:55 +00:00
|
|
|
};
|
|
|
|
appservice = {
|
|
|
|
max_body_size = 10;
|
|
|
|
database = "postgres:///mautrix_signal?sslmode=disable&host=/run/postgresql";
|
|
|
|
};
|
|
|
|
metrics = {
|
|
|
|
enabled = true;
|
|
|
|
listen = "[::]:29329";
|
|
|
|
};
|
|
|
|
bridge = {
|
|
|
|
displayname_template = "{displayname}";
|
|
|
|
autocreate_contact_portal = true;
|
2023-05-28 12:31:17 +00:00
|
|
|
public_portals = true;
|
2022-11-24 09:21:48 +00:00
|
|
|
sync_with_custom_puppets = true;
|
2023-05-28 12:31:17 +00:00
|
|
|
sync_direct_chat_list = true;
|
2022-05-03 20:36:55 +00:00
|
|
|
encryption = {
|
|
|
|
allow = true;
|
2024-05-17 07:05:12 +00:00
|
|
|
default = true;
|
2023-10-01 14:47:26 +00:00
|
|
|
appservice = false;
|
2024-03-13 19:47:47 +00:00
|
|
|
require = false;
|
2022-11-22 10:35:25 +00:00
|
|
|
allow_key_sharing = true;
|
2022-05-03 20:36:55 +00:00
|
|
|
};
|
|
|
|
private_chat_portal_meta = true;
|
|
|
|
delivery_receipts = true;
|
|
|
|
periodic_sync = 86400;
|
|
|
|
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 20:36:55 +00:00
|
|
|
"@lotte:chir.rs" = "admin";
|
|
|
|
};
|
2023-03-21 19:33:25 +00:00
|
|
|
relay.enabled = true;
|
2024-06-26 05:11:44 +00:00
|
|
|
login_shared_secret_map = {
|
|
|
|
"chir.rs" = "as_token:$SHARED_AS_TOKEN";
|
|
|
|
};
|
2022-05-03 20:36:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-06-26 05:11:44 +00:00
|
|
|
sops.secrets."services/mautrix/shared_secret" = {};
|
2022-05-03 20:36:55 +00:00
|
|
|
services.postgresql.ensureDatabases = [
|
|
|
|
"mautrix_signal"
|
|
|
|
];
|
|
|
|
}
|