chore(mediabox): re-add service ports

This commit is contained in:
arcnmx 2024-01-25 07:49:29 -08:00
parent f1018dfbff
commit 1bae94505d
4 changed files with 53 additions and 10 deletions

14
modules/nixos/lidarr.nix Normal file
View file

@ -0,0 +1,14 @@
{
lib,
...
}: let
inherit (lib.options) mkOption;
in {
options.services.lidarr = with lib.types; {
port = mkOption {
type = port;
default = 8686;
readOnly = true;
};
};
}

View file

@ -0,0 +1,14 @@
{
lib,
...
}: let
inherit (lib.options) mkOption;
in {
options.services.prowlarr = with lib.types; {
port = mkOption {
type = port;
default = 9696;
readOnly = true;
};
};
}

14
modules/nixos/readarr.nix Normal file
View file

@ -0,0 +1,14 @@
{
lib,
...
}: let
inherit (lib.options) mkOption;
in {
options.services.readarr = with lib.types; {
port = mkOption {
type = port;
default = 8787;
readOnly = true;
};
};
}

View file

@ -8,7 +8,7 @@
inherit (lib.modules) mkIf mkMerge; inherit (lib.modules) mkIf mkMerge;
inherit (lib.attrsets) mapAttrs mapAttrsToList; inherit (lib.attrsets) mapAttrs mapAttrsToList;
inherit (lib.strings) removePrefix; inherit (lib.strings) removePrefix;
inherit (config.services) deluge plex tautulli ombi sonarr radarr bazarr jackett cloudflared; inherit (config.services) deluge plex tautulli ombi sonarr radarr bazarr lidarr readarr prowlarr cloudflared;
kyuuto = "/mnt/kyuuto-media"; kyuuto = "/mnt/kyuuto-media";
kyuuto-library = kyuuto + "/library"; kyuuto-library = kyuuto + "/library";
plexLibrary = { plexLibrary = {
@ -49,20 +49,21 @@ in {
services.cloudflared = let services.cloudflared = let
tunnelId = "6a3c1863-d879-462f-b5d5-7c6ddf476d0e"; tunnelId = "6a3c1863-d879-462f-b5d5-7c6ddf476d0e";
inherit (config.networking) domain;
in { in {
tunnels.${tunnelId} = { tunnels.${tunnelId} = {
default = "http_status:404"; default = "http_status:404";
credentialsFile = config.sops.secrets.cloudflare_mediabox_tunnel.path; credentialsFile = config.sops.secrets.cloudflare_mediabox_tunnel.path;
ingress = { ingress = {
"tautulli.gensokyo.zone".service = "http://localhost:${toString config.services.tautulli.port}"; "tautulli.${domain}".service = "http://localhost:${toString tautulli.port}";
"ombi.gensokyo.zone".service = "http://localhost:${toString config.services.ombi.port}"; "ombi.${domain}".service = "http://localhost:${toString ombi.port}";
"sonarr.gensokyo.zone".service = "http://localhost:8989"; "sonarr.${domain}".service = "http://localhost:${toString sonarr.port}";
"radarr.gensokyo.zone".service = "http://localhost:7878"; "radarr.${domain}".service = "http://localhost:${toString radarr.port}";
"bazarr.gensokyo.zone".service = "http://localhost:6767"; "bazarr.${domain}".service = "http://localhost:${toString bazarr.listenPort}";
"lidarr.gensokyo.zone".service = "http://localhost:8686"; "lidarr.${domain}".service = "http://localhost:${toString lidarr.port}";
"readarr.gensokyo.zone".service = "http://localhost:8787"; "readarr.${domain}".service = "http://localhost:${toString readarr.port}";
"prowlarr.gensokyo.zone".service = "http://localhost:9696"; "prowlarr.${domain}".service = "http://localhost:${toString prowlarr.port}";
"deluge.gensokyo.zone".service = "http://localhost:${toString config.services.deluge.web.port}"; "deluge.${domain}".service = "http://localhost:${toString deluge.web.port}";
}; };
}; };
}; };