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

69 lines
1.6 KiB
Nix
Raw Normal View History

2022-06-12 15:39:15 +00:00
{
pkgs,
config,
...
}: {
2022-05-03 20:36:55 +00:00
imports = [
../../modules/matrix/mautrix-signal.nix
];
services.mautrix-signal = {
enable = true;
environmentFile = pkgs.emptyFile;
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;
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";
};
signal = {
socket_path = config.services.signald.socketPath;
2022-11-27 16:02:41 +00:00
avatar_dir = "/var/lib/signald/avatars";
data_dir = "/var/lib/signald/data";
2022-05-03 20:36:55 +00:00
};
bridge = {
displayname_template = "{displayname}";
autocreate_contact_portal = true;
public_portals = true;
2022-11-24 09:21:48 +00:00
sync_with_custom_puppets = true;
sync_direct_chat_list = true;
2022-05-03 20:36:55 +00:00
encryption = {
allow = true;
2023-10-01 14:47:26 +00:00
default = true;
appservice = false;
require = true;
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";
2022-05-03 20:36:55 +00:00
"@lotte:chir.rs" = "admin";
};
2023-03-21 19:33:25 +00:00
relay.enabled = true;
2022-05-03 20:36:55 +00:00
};
};
};
services.postgresql.ensureDatabases = [
"mautrix_signal"
];
2022-06-12 15:39:15 +00:00
services.postgresql.ensureUsers = [
{
name = "mautrix-signal";
ensurePermissions = {
"DATABASE mautrix_signal" = "ALL PRIVILEGES";
};
}
];
2022-05-03 20:36:55 +00:00
}