mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Add headphones
This commit is contained in:
parent
69c09c2099
commit
856c9456bd
1 changed files with 41 additions and 31 deletions
|
|
@ -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 = {
|
||||||
|
"transmission.${config.networking.domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = { proxyPass = "http://192.168.1.2:9091"; };
|
||||||
|
};
|
||||||
|
"jackett.${config.networking.domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = { proxyPass = "http://192.168.1.2:9117"; };
|
||||||
|
};
|
||||||
|
"sonarr.${config.networking.domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = { proxyPass = "http://192.168.1.2:8989"; };
|
||||||
|
};
|
||||||
|
"radarr.${config.networking.domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = { proxyPass = "http://192.168.1.2:7878"; };
|
||||||
|
};
|
||||||
|
"headphones.${config.networking.domain}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://192.168.1.2:9091";
|
proxyPass =
|
||||||
|
"http://192.168.1.2:${toString config.services.headphones.port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."jackett.${config.networking.domain}" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://192.168.1.2:9117";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."sonarr.${config.networking.domain}" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://192.168.1.2:8989";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."radarr.${config.networking.domain}" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://192.168.1.2:7878";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue