zion/modules/communication.nix

45 lines
1.1 KiB
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;
names = [ "client" "webclient" "federation" ];
}];
x_forwarded = true;
}];
};
# Telegram bridge for Matrix
services.mautrix-telegram = {
enable = false;
environmentFile = /var/lib/mautrix-telegram/telegram.env;
settings = {
homeserver = {
address = "https://matrix.coolneng.duckdns.org";
domain = "coolneng.duckdns.org";
};
appservice = {
provisioning.enabled = false;
id = "telegram";
public = {
enabled = true;
prefix = "/public";
external = "https://matrix.coolneng.duckdns.org/public";
};
};
bridge = {
relaybot.authless_portals = false;
permissions = { "@admin:matrix.coolneng.duckdns.org" = "admin"; };
};
};
serviceDependencies = [ "matrix-synapse.service" ];
};
}