1
0
Fork 0
dotfiles/system/nixos/dendrite.nix

58 lines
1.7 KiB
Nix
Raw Normal View History

2022-11-27 16:12:49 +00:00
{ secret, ... }:
let
connectionString = "postgres://${secret.dendrite.database.user}:${secret.dendrite.database.password}@10.99.99.3/dendrite?sslmode=disable";
in
{
services.dendrite = {
enable = true;
2022-11-27 16:31:25 +00:00
environmentFile = "/var/lib/dendrite-secrets/environment";
2022-11-27 16:12:49 +00:00
loadCredential = [
2022-11-27 16:31:25 +00:00
"private_key:/var/lib/dendrite-secrets/matrix_key.pem"
2022-11-27 16:12:49 +00:00
];
settings = {
global = {
server_name = "kempkens.io";
private_key = "$CREDENTIALS_DIRECTORY/private_key";
metrics.enabled = false;
report_stats.enabled = false;
};
2022-11-27 19:00:50 +00:00
app_service_api = {
database.connection_string = connectionString;
config_files = [
2022-11-27 19:55:46 +00:00
"/etc/container-matrix/signal/registration.yaml"
2022-11-27 19:00:50 +00:00
"/etc/container-matrix/telegram/registration.yaml"
2022-11-27 19:55:46 +00:00
"/etc/container-matrix/whatsapp/registration.yaml"
2022-11-27 19:00:50 +00:00
];
};
2022-11-27 16:12:49 +00:00
federation_api.database.connection_string = connectionString;
key_server.database.connection_string = connectionString;
media_api.database.connection_string = connectionString;
mscs.database.connection_string = connectionString;
room_server.database.connection_string = connectionString;
sync_api.database.connection_string = connectionString;
user_api.account_database.connection_string = connectionString;
user_api.device_database.connection_string = connectionString;
client_api = {
registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
registration_disabled = true;
};
mscs.mscs = [
# threading
"msc2946"
# spaces
"msc2836"
];
};
};
2022-11-27 17:16:38 +00:00
networking.firewall.allowedTCPPorts = [ 8008 ];
2022-11-27 16:12:49 +00:00
}