Refactor configs

This commit is contained in:
Invariantspace 2024-08-31 21:13:43 -07:00
parent 84f7bc915f
commit 9710cae748
No known key found for this signature in database
GPG key ID: EBC4A20067373921
12 changed files with 125 additions and 128 deletions

View file

@ -1,10 +1,24 @@
{config, ...}: {
services.matrix-conduit = {
enable = true;
settings.global = with config.constants; {
address = wildcard;
port = port.conduit;
server_name = domain;
services = with config.constants; {
coturn = {
enable = true;
realm = localhost;
static-auth-secret-file = config.sops.secrets.coturn.path;
use-auth-secret = true;
};
matrix-conduit = {
enable = true;
settings.global = {
address = wildcard;
port = port.conduit;
turn_secret = "TbbL8a4tsv6HkR9esjkPa4$fTKX";
turn_uris = [
"turn:${localhost}?transport=udp"
"turn:${localhost}?transport=tcp"
];
server_name = domain;
};
};
};
sops.secrets.coturn = {};
}

View file

@ -2,11 +2,8 @@
config,
pkgs,
...
}: let
const = config.constants;
ports = const.port;
usr = const.userName;
in {
}:
with config.constants; {
hardware.graphics.enable = true;
services = {
@ -17,29 +14,29 @@ in {
check-integrity = true;
max-concurrent-downloads = 16;
rpc-listen-all = true;
rpc-listen-port = ports.aria2;
rpc-listen-port = port.aria2;
};
};
jellyfin = {
enable = true;
user = usr;
user = userName;
};
jellyseerr = {
enable = true;
port = ports.jellyseerr;
port = port.jellyseerr;
};
prowlarr.enable = true;
radarr = {
enable = true;
user = usr;
user = userName;
};
sonarr = {
enable = true;
user = usr;
user = userName;
};
};
sops.secrets.aria2 = {};
users.users.${usr}.extraGroups = [config.systemd.services.aria2.serviceConfig.Group];
users.users.${userName}.extraGroups = [config.systemd.services.aria2.serviceConfig.Group];
}