Add headphones

This commit is contained in:
Paul-Henri Froidmont 2023-09-07 16:19:23 +02:00
parent 69c09c2099
commit 856c9456bd
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE

View file

@ -1,13 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: {
{
sops.secrets = { sops.secrets = {
vpnCredentials = { vpnCredentials = { key = "openvpn/credentials"; };
key = "openvpn/credentials"; transmissionRpcCredentials = { key = "transmission/rpc_config.json"; };
};
transmissionRpcCredentials = {
key = "transmission/rpc_config.json";
};
}; };
containers.torrents = { containers.torrents = {
@ -42,6 +37,10 @@
hostPath = "/nix/var/data/radarr"; hostPath = "/nix/var/data/radarr";
isReadOnly = false; isReadOnly = false;
}; };
"/nix/var/data/headphones" = {
hostPath = "/nix/var/data/headphones";
isReadOnly = false;
};
"/nix/var/data/transmission" = { "/nix/var/data/transmission" = {
hostPath = "/nix/var/data/transmission"; hostPath = "/nix/var/data/transmission";
isReadOnly = false; isReadOnly = false;
@ -169,6 +168,15 @@
group = config.users.groups.www-data.name; group = config.users.groups.www-data.name;
dataDir = "/nix/var/data/radarr"; dataDir = "/nix/var/data/radarr";
}; };
services.headphones = {
enable = true;
user = config.users.users.www-data.name;
group = config.users.groups.www-data.name;
dataDir = "/nix/var/data/headphones";
host = "192.168.1.2";
};
networking.firewall.allowedTCPPorts = [ config.services.headphones.port ];
system.stateVersion = "21.11"; system.stateVersion = "21.11";
}; };
@ -184,32 +192,34 @@
autoStart = true; autoStart = true;
}; };
services.nginx.virtualHosts."transmission.${config.networking.domain}" = { services.nginx.virtualHosts = {
forceSSL = true; "transmission.${config.networking.domain}" = {
enableACME = true; forceSSL = true;
locations."/" = { enableACME = true;
proxyPass = "http://192.168.1.2:9091"; locations."/" = { proxyPass = "http://192.168.1.2:9091"; };
}; };
}; "jackett.${config.networking.domain}" = {
services.nginx.virtualHosts."jackett.${config.networking.domain}" = { forceSSL = true;
forceSSL = true; enableACME = true;
enableACME = true; locations."/" = { proxyPass = "http://192.168.1.2:9117"; };
locations."/" = {
proxyPass = "http://192.168.1.2:9117";
}; };
}; "sonarr.${config.networking.domain}" = {
services.nginx.virtualHosts."sonarr.${config.networking.domain}" = { forceSSL = true;
forceSSL = true; enableACME = true;
enableACME = true; locations."/" = { proxyPass = "http://192.168.1.2:8989"; };
locations."/" = {
proxyPass = "http://192.168.1.2:8989";
}; };
}; "radarr.${config.networking.domain}" = {
services.nginx.virtualHosts."radarr.${config.networking.domain}" = { forceSSL = true;
forceSSL = true; enableACME = true;
enableACME = true; locations."/" = { proxyPass = "http://192.168.1.2:7878"; };
locations."/" = { };
proxyPass = "http://192.168.1.2:7878"; "headphones.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass =
"http://192.168.1.2:${toString config.services.headphones.port}";
};
}; };
}; };
} }