nixos-config/legacy/robi/media-arr.nix

81 lines
1.7 KiB
Nix
Raw Normal View History

2023-11-17 15:13:30 +01:00
{ config, ... }:
{
2023-11-18 12:49:47 +01:00
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 7878 8989 ];
# download series
2023-11-17 15:13:30 +01:00
services.sonarr = {
enable = true;
group = "media";
user = "media";
};
2023-11-18 12:49:47 +01:00
# download movies
2023-11-17 15:13:30 +01:00
services.radarr = {
enable = true;
group = "media";
user = "media";
};
2023-11-18 12:49:47 +01:00
# better indexer apis
services.prowlarr = {
enable = true;
#group = "media";
#user = "media";
};
services.jellyseerr = {
enable = true;
};
services.permown."/media/arr" = {
owner = "media";
group = "media";
directory-mode = "770";
file-mode = "770";
};
2023-11-17 15:13:30 +01:00
services.nginx.virtualHosts = {
"radarr.${config.networking.hostName}.private" = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:7878";
proxyWebsockets = true;
};
};
"sonarr.${config.networking.hostName}.private" = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:8989";
proxyWebsockets = true;
};
};
2023-11-18 12:49:47 +01:00
"prowlarr.${config.networking.hostName}.private" = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:9696";
proxyWebsockets = true;
};
};
"jellyseerr.${config.networking.hostName}.private" = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:${toString config.services.jellyseerr.port}";
proxyWebsockets = true;
};
};
2023-11-17 15:13:30 +01:00
};
}