Move MPD to home manager

This commit is contained in:
Jimbo 2024-12-29 09:47:44 -05:00
parent 2beaf963c2
commit bcadad2420
16 changed files with 43 additions and 66 deletions

View file

@ -1,41 +0,0 @@
{ config, ... }:
{
imports = [ ./nginx ];
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.jim1}";
cert = "/var/lib/acme/turn.${config.domains.jim1}.com/fullchain.pem";
pkey = "/var/lib/acme/turn.${config.domains.jim1}.com/key.pem";
};
# Enable coturn on Synapse
matrix-synapse.settings = {
turn_uris = [
"turn:turn.${config.domains.jim1}:3478?transport=udp"
"turn:turn.${config.domains.jim1}: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;
}];
};
}

View file

@ -1,20 +0,0 @@
{ config, ... }:
{
services.nginx.virtualHosts."turn.${config.domains.jim1}" = {
enableACME = true;
forceSSL = true;
listen = [{
addr = "0.0.0.0";
port = 80;
ssl = false;
}];
locations."/".proxyPass = "http://127.0.0.1:1380";
};
security.acme.certs = {
"turn.${config.domains.jim1}" = {
group = "turnserver";
postRun = "systemctl restart coturn.service";
};
};
}

View file

@ -1,11 +1,5 @@
{ pkgs, config, ... }:
{
imports = [
./coturn
./slidingsync
./nginx
];
services.matrix-synapse = {
enable = true;
settings = {

View file

@ -1,13 +0,0 @@
{ pkgs, config, ... }:
{
services.matrix-sliding-sync = {
enable = true;
settings = {
SYNCV3_SERVER = "https://matrix.${config.domains.jim1}";
SYNCV3_BINDADDR = "0.0.0.0:8009";
};
environmentFile = pkgs.writeText "matrixsecret" ''
SYNCV3_SECRET=${config.secrets.matrixSecret}
'';
};
}