zion/modules/communication.nix

42 lines
1.1 KiB
Nix

{ config, lib, pkgs, ... }:
{
# Matrix server configuration
services.matrix-synapse = {
enable = true;
settings = {
server_name = "coolneng.duckdns.org";
public_baseurl = "https://matrix.coolneng.duckdns.org";
listeners = [{
port = 8008;
tls = false;
resources = [{
compress = true;
names = [ "client" ];
}];
bind_addresses = [ "127.0.0.1" ];
}];
app_service_config_files =
[ "/var/lib/matrix-synapse/telegram-registration.yaml" ];
};
};
# 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 = {
address = "http://localhost:8118";
port = 8118;
};
bridge.permissions."@coolneng:coolneng.duckdns.org" = "admin";
};
serviceDependencies = [ "matrix-synapse.service" ];
};
}