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-06-04 08:43:36 +00:00
|
|
|
address = "https://matrix.chir.rs";
|
2022-05-03 20:36:55 +00:00
|
|
|
domain = "chir.rs";
|
|
|
|
http_retry_count = 1000;
|
2022-05-28 07:43:59 +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";
|
|
|
|
};
|
|
|
|
signal = {
|
|
|
|
socket_path = config.services.signald.socketPath;
|
|
|
|
avatar_dir = "/var/lib/mautrix-signal/avatars";
|
|
|
|
data_dir = "/var/lib/mautrix-signal/data";
|
|
|
|
};
|
|
|
|
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-05-03 20:36:55 +00:00
|
|
|
encryption = {
|
|
|
|
allow = true;
|
|
|
|
};
|
|
|
|
private_chat_portal_meta = true;
|
|
|
|
delivery_receipts = true;
|
|
|
|
delivery_error_reports = true;
|
|
|
|
periodic_sync = 86400;
|
|
|
|
permissions = {
|
|
|
|
"@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
|
|
|
}
|