Use common module

This commit is contained in:
pazpi 2025-01-08 14:33:52 +01:00
parent b48e25aa7d
commit ae24ddfe1a
9 changed files with 64 additions and 115 deletions

View file

@ -10,6 +10,12 @@ with lib;
let
cfg = config.my.services.media-mgr;
lidarrPort = toString 8686;
radarrPort = toString 7878;
sonarrPort = toString 8989;
readarrPort = toString 8787;
prowlarrPort = toString 9696;
containersDefinition = {
flaresolverr = {
@ -112,7 +118,6 @@ in
# Request management and media discovery tool for the Plex ecosystem
jellyseerr = {
enable = true;
port = 5055;
openFirewall = true;
};
@ -134,31 +139,31 @@ in
(lib.mkIf cfg.proxy.enable {
services.caddy = with cfg.proxy; {
virtualHosts."prowlarr.${domain}".extraConfig = ''
reverse_proxy http://${host}:9696
reverse_proxy http://${host}:${prowlarrPort}
import cloudflare_${domain}
'';
virtualHosts."radarr.${domain}".extraConfig = ''
reverse_proxy http://${host}:7878
reverse_proxy http://${host}:${radarrPort}
import cloudflare_${domain}
'';
virtualHosts."sonarr.${domain}".extraConfig = ''
reverse_proxy http://${host}:8989
reverse_proxy http://${host}:${sonarrPort}
import cloudflare_${domain}
'';
virtualHosts."lidarr.${domain}".extraConfig = ''
reverse_proxy http://${host}:8686
reverse_proxy http://${host}:${lidarrPort}
import cloudflare_${domain}
'';
virtualHosts."readarr.${domain}".extraConfig = ''
reverse_proxy http://${host}:8787
reverse_proxy http://${host}:${readarrPort}
import cloudflare_${domain}
'';
virtualHosts."bazarr.${domain}".extraConfig = ''
reverse_proxy http://${host}:6767
reverse_proxy http://${host}:${toString config.services.bazarr.listenPort}
import cloudflare_${domain}
'';
virtualHosts."jellyseerr.${domain}".extraConfig = ''
reverse_proxy http://${host}:5055
reverse_proxy http://${host}:${toString config.services.jellyseerr.port}
import cloudflare_${domain}
'';
};
@ -240,7 +245,7 @@ in
services.prometheus.exporters = {
exportarr-prowlarr = {
enable = true;
url = "http://arr.internal:9696";
url = "http://${host}:${prowlarrPort}";
port = 9701;
user = "exportarr";
group = "exportarr";
@ -248,7 +253,7 @@ in
};
exportarr-radarr = {
enable = true;
url = "http://arr.internal:7878";
url = "http://${host}:${radarrPort}";
port = 9702;
user = "exportarr";
group = "exportarr";
@ -256,7 +261,7 @@ in
};
exportarr-sonarr = {
enable = true;
url = "http://arr.internal:8989";
url = "http://${host}:${sonarrPort}";
port = 9703;
user = "exportarr";
group = "exportarr";
@ -264,7 +269,7 @@ in
};
exportarr-lidarr = {
enable = true;
url = "http://arr.internal:8686";
url = "http://${host}:${lidarrPort}";
port = 9704;
user = "exportarr";
group = "exportarr";
@ -272,7 +277,7 @@ in
};
exportarr-readarr = {
enable = true;
url = "http://arr.internal:8787";
url = "http://${host}:${readarrPort}";
port = 9705;
user = "exportarr";
group = "exportarr";
@ -280,7 +285,7 @@ in
};
exportarr-bazarr = {
enable = true;
url = "http://arr.internal:6767";
url = "http://${host}:${toString config.services.bazarr.listenPort}";
port = 9706;
user = "exportarr";
group = "exportarr";

View file

@ -143,7 +143,6 @@ in
settings = {
host = [
''127\.0\.0\.1''
"::1"
];
storage.wopi."@allow" = true;
};
@ -159,7 +158,10 @@ in
};
networking.firewall.allowedTCPPorts = [ 9980 ];
networking.firewall.allowedTCPPorts = [
80
config.services.collabora-online.port
];
environment.systemPackages = with pkgs; [
exiftool