2022-10-17 15:54:48 +03:00
|
|
|
{ config, tools, ... }:
|
2021-10-16 20:34:13 +03:00
|
|
|
with tools.nginx;
|
|
|
|
{
|
2022-06-18 03:44:51 +03:00
|
|
|
links = {
|
|
|
|
ombi.protocol = "http";
|
|
|
|
radarr = {
|
|
|
|
protocol = "http";
|
|
|
|
port = 7878;
|
|
|
|
};
|
|
|
|
sonarr = {
|
|
|
|
protocol = "http";
|
|
|
|
port = 8989;
|
|
|
|
};
|
|
|
|
prowlarr = {
|
|
|
|
protocol = "http";
|
|
|
|
port = 9696;
|
|
|
|
};
|
|
|
|
};
|
2021-11-29 02:38:59 +02:00
|
|
|
|
2022-08-27 00:44:17 +03:00
|
|
|
users = {
|
|
|
|
groups.mediamanagers.gid = 646000020;
|
|
|
|
users = {
|
|
|
|
radarr.extraGroups = [ "mediamanagers" ];
|
|
|
|
sonarr.extraGroups = [ "mediamanagers" ];
|
|
|
|
};
|
|
|
|
};
|
2021-10-16 20:34:13 +03:00
|
|
|
services = {
|
|
|
|
radarr = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
sonarr = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2022-06-08 22:03:18 +03:00
|
|
|
prowlarr = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2021-10-16 20:34:13 +03:00
|
|
|
ombi = {
|
|
|
|
enable = true;
|
2022-06-18 03:44:51 +03:00
|
|
|
inherit (config.links.ombi) port;
|
2021-10-16 20:34:13 +03:00
|
|
|
};
|
|
|
|
|
2022-06-18 03:44:51 +03:00
|
|
|
nginx.virtualHosts = with config.links; mappers.mapSubdomains {
|
|
|
|
radarr = vhosts.proxy radarr.url;
|
|
|
|
sonarr = vhosts.proxy sonarr.url;
|
|
|
|
fbi-index = vhosts.proxy prowlarr.url;
|
|
|
|
fbi-requests = vhosts.proxy ombi.url;
|
2021-10-16 20:34:13 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
systemd.services.radarr.serviceConfig.Slice = "mediamanagement.slice";
|
|
|
|
systemd.services.sonarr.serviceConfig.Slice = "mediamanagement.slice";
|
2022-06-08 22:03:18 +03:00
|
|
|
systemd.services.prowlarr = {
|
2022-07-24 23:44:55 +03:00
|
|
|
after = [ "wireguard-wgmv-es1.service" "network-addresses-wgmv-es1.service" ];
|
2022-06-08 22:03:18 +03:00
|
|
|
serviceConfig = {
|
|
|
|
Slice = "mediamanagement.slice";
|
|
|
|
IPAddressDeny = [ "any" ];
|
|
|
|
IPAddressAllow = [
|
|
|
|
"localhost"
|
|
|
|
"10.64.0.0/16"
|
|
|
|
"10.124.0.0/16"
|
|
|
|
"10.100.0.0/24"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2021-10-16 20:34:13 +03:00
|
|
|
}
|