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

69 lines
1.7 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 = {
2022-08-25 18:43:17 +00:00
address = "https://matrix.int.chir.rs";
2022-05-03 20:36:55 +00:00
domain = "chir.rs";
http_retry_count = 1000;
};
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;
double_puppet_allow_discovery = true;
2022-06-12 15:39:15 +00:00
double_puppet_server_map = {};
login_shared_secret_map = {};
2022-11-24 09:21:48 +00:00
sync_with_custom_puppets = true;
2022-05-03 20:36:55 +00:00
encryption = {
allow = true;
2023-03-18 09:18:02 +00:00
default = false;
require = false;
allow_key_sharing = true;
2022-05-03 20:36:55 +00:00
};
2023-03-18 09:16:33 +00:00
sync_direct_chat_list = true;
2022-05-03 20:36:55 +00:00
private_chat_portal_meta = true;
delivery_receipts = true;
delivery_error_reports = true;
periodic_sync = 86400;
permissions = {
2023-03-20 13:58:46 +00:00
"*" = "relaybot";
2022-05-03 20:36:55 +00:00
"@lotte:chir.rs" = "admin";
};
};
};
};
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
}