zion/modules/communication.nix

41 lines
982 B
Nix
Raw Normal View History

2020-12-28 18:42:26 +01:00
{ config, lib, pkgs, ... }:
{
# Matrix server configuration
services.matrix-synapse = {
enable = true;
server_name = "coolneng.duckdns.org";
listeners = [{
port = 8008;
tls = false;
resources = [{
compress = true;
2021-02-03 01:46:38 +01:00
names = [ "client" ];
2020-12-28 18:42:26 +01:00
}];
x_forwarded = true;
}];
2021-02-03 18:38:41 +01:00
app_service_config_files =
[ "/var/lib/matrix-synapse/telegram-registration.yaml" ];
2020-12-28 18:42:26 +01:00
};
# Telegram bridge for Matrix
services.mautrix-telegram = {
2021-02-03 01:46:38 +01:00
enable = true;
2020-12-28 18:42:26 +01:00
environmentFile = /var/lib/mautrix-telegram/telegram.env;
settings = {
homeserver = {
address = "https://matrix.coolneng.duckdns.org";
domain = "coolneng.duckdns.org";
};
appservice = {
2021-02-03 18:38:41 +01:00
address = "http://localhost:8118";
port = 8118;
2020-12-28 18:42:26 +01:00
};
bridge = {
2021-02-03 18:38:41 +01:00
permissions = { "@coolneng:coolneng.duckdns.org" = "admin"; };
2020-12-28 18:42:26 +01:00
};
};
serviceDependencies = [ "matrix-synapse.service" ];
};
}