39 lines
773 B
Nix
39 lines
773 B
Nix
|
{ config, ... }:
|
||
|
{
|
||
|
services.sonarr = {
|
||
|
enable = true;
|
||
|
group = "media";
|
||
|
user = "media";
|
||
|
};
|
||
|
|
||
|
services.radarr = {
|
||
|
enable = true;
|
||
|
group = "media";
|
||
|
user = "media";
|
||
|
};
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
}
|