Set up Matrix and Element
This commit is contained in:
44
modules/communication.nix
Normal file
44
modules/communication.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ 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" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user