Move server to persistence, still have stuff to fix

This commit is contained in:
Jimbo 2025-01-17 17:06:28 -05:00
parent ce6ffd9ee7
commit cc68f883ba
35 changed files with 293 additions and 235 deletions

View file

@ -0,0 +1,43 @@
{ config, lib, ... }:
{
imports = [ ./nginx ];
config = lib.mkIf config.services.matrix-synapse.enable {
services = {
coturn = {
enable = true;
no-cli = true;
no-tcp-relay = true;
min-port = 49000;
max-port = 50000;
use-auth-secret = true;
static-auth-secret = config.secrets.coturnSecret;
realm = "turn.${config.domains.p1}";
cert = "/var/lib/acme/turn.${config.domains.p1}.com/fullchain.pem";
pkey = "/var/lib/acme/turn.${config.domains.p1}.com/key.pem";
};
# Enable coturn on Synapse
matrix-synapse.settings = {
turn_uris = [
"turn:turn.${config.domains.p1}:3478?transport=udp"
"turn:turn.${config.domains.p1}:3478?transport=tcp"
];
turn_shared_secret = config.secrets.coturnSecret;
turn_user_lifetime = "1h";
};
};
# Open coturn ports
networking.firewall = {
allowedUDPPorts = [
3478
5349
];
allowedUDPPortRanges = [{
from = config.services.coturn.min-port;
to = config.services.coturn.max-port;
}];
};
};
}