zion/modules/communication.nix

45 lines
1.1 KiB
Nix

{ 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" ];
}];
x_forwarded = true;
}];
};
# Telegram bridge for Matrix
services.mautrix-telegram = {
enable = true;
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" ];
};
}