2020-12-28 18:42:26 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# Matrix server configuration
|
|
|
|
services.matrix-synapse = {
|
|
|
|
enable = true;
|
|
|
|
server_name = "coolneng.duckdns.org";
|
2021-02-04 00:22:26 +01:00
|
|
|
public_baseurl = "https://matrix.coolneng.duckdns.org";
|
2020-12-28 18:42:26 +01:00
|
|
|
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
|
|
|
}];
|
|
|
|
}];
|
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" ];
|
|
|
|
};
|
|
|
|
}
|