1
0
Fork 0

Modularize GY config

This commit is contained in:
Avery 2024-06-28 22:20:11 +02:00
parent 15b909473e
commit cd03afb425
Signed by: Avery
GPG key ID: B684FD451B692E04
8 changed files with 109 additions and 26 deletions

View file

@ -0,0 +1,41 @@
{ pkgs, ... }: {
services.coturn = {
enable = true;
realm = "rcia.dev";
min-port = 49152;
max-port = 49200;
use-auth-secret = true;
static-auth-secret-file = "/run/turnserver/auth_secret"
extraConfig = ''
syslog
no-rfc5780
no-stun-backward-compatibility
response-origin-only-with-rfc5780
denied-peer-ip=10.0.0.0-10.255.255.255
denied-peer-ip=192.168.0.0-192.168.255.255
denied-peer-ip=172.16.0.0-172.31.255.255
no-multicast-peers
denied-peer-ip=0.0.0.0-0.255.255.255
denied-peer-ip=100.64.0.0-100.127.255.255
denied-peer-ip=127.0.0.0-127.255.255.255
denied-peer-ip=169.254.0.0-169.254.255.255
denied-peer-ip=192.0.0.0-192.0.0.255
denied-peer-ip=192.0.2.0-192.0.2.255
denied-peer-ip=192.88.99.0-192.88.99.255
denied-peer-ip=198.18.0.0-198.19.255.255
denied-peer-ip=198.51.100.0-198.51.100.255
denied-peer-ip=203.0.113.0-203.0.113.255
denied-peer-ip=240.0.0.0-255.255.255.255
allowed-peer-ip=10.0.0.1
allowed-peer-ip=10.10.0.1
allowed-peer-ip=10.10.0.2
allowed-peer-ip=10.10.0.3
user-quota=16
total-quota=128
'';
};
sops.secrets."coturn/static_auth_secret" = {
path = "/run/turnserver/auth_secret";
owner = "turnserver";
};
}

View file

@ -0,0 +1,34 @@
{ pkgs, ... }:
let dataDir = "/mnt/Datos/synapse";
in {
services.matrix-synapse = {
enable = true;
settings = {
server_name = "rcia.dev";
listeners = [{
port = 8008;
bind_addresses = [ "synapse" ];
tls = false;
type = http;
x_forwarded = true;
resources = [{
names = [ "client" "federation" ];
compress = false;
}];
}];
media_store_path = dataDir + "/media_store";
max_upload_size = "100M";
enable_registration = false;
report_stats = true;
signing_key_path = "/var/lib/matrix-synapse/matrix.rcia.dev.signing.key";
turn_user_lifetime = "1h";
turn_uris = [ "turn:rcia.dev:3478" "turn:rcia.dev:3479" ];
};
};
sops.secrets = {
"matrix/secrets" = {
path = "/var/lib/matrix-synapse/secrets";
owner = "matrix-synapse";
}
}
}