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;
|
|
|
|
};
|
|
|
|
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-04-19 20:09:26 +00:00
|
|
|
default = true;
|
2023-03-18 09:18:02 +00:00
|
|
|
require = false;
|
2022-11-22 10:35:25 +00:00
|
|
|
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-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
|
|
|
}
|