Config coturn

This commit is contained in:
Invariantspace 2024-08-31 23:53:22 -07:00
parent 9710cae748
commit b08a27c475
No known key found for this signature in database
GPG key ID: EBC4A20067373921
8 changed files with 122 additions and 88 deletions

View file

@ -1,8 +1,15 @@
{config, ...}: let
hn = config.networking.hostName;
in {
{config, ...}: {
networking = {
firewall.allowedTCPPorts = with config.constants.port; [http https];
firewall = with config.constants.port; {
allowedTCPPorts = [coturn coturn-tls http https];
allowedUDPPorts = [coturn coturn-tls];
allowedUDPPortRanges = [
{
from = coturn-relay-udp-min;
to = coturn-relay-udp-max;
}
];
};
hostId = "2cadb253";
nftables.enable = true;
};
@ -10,11 +17,11 @@ in {
services = {
cloudflare-dyndns = {
enable = true;
apiTokenFile = config.sops.secrets."cloudflare/${hn}".path;
apiTokenFile = config.sops.secrets.cloudflare.path;
domains = builtins.attrNames config.services.caddy.virtualHosts;
};
openssh.enable = true;
};
sops.secrets."cloudflare/${hn}" = {};
sops.secrets.cloudflare = {};
}