feat(arr): Add exposePorts option
This commit is contained in:
parent
5f027ca12a
commit
74e4e8dcd6
1 changed files with 58 additions and 22 deletions
|
|
@ -14,12 +14,53 @@ let
|
||||||
in {
|
in {
|
||||||
options.homelab.apps.arr = {
|
options.homelab.apps.arr = {
|
||||||
enable = lib.mkEnableOption "Arr Stack using Docker";
|
enable = lib.mkEnableOption "Arr Stack using Docker";
|
||||||
|
exposePorts = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Expose all app ports";
|
||||||
|
# Only expose ports by default if Traefik is not in use.
|
||||||
|
default = ! config.homelab.apps.traefik.enable;
|
||||||
|
};
|
||||||
|
|
||||||
bazarr.enable = lib.mkEnableOption "Bazarr using Docker";
|
bazarr = {
|
||||||
prowlarr.enable = lib.mkEnableOption "Prowlarr using Docker";
|
enable = lib.mkEnableOption "Bazarr using Docker";
|
||||||
qbittorrent.enable = lib.mkEnableOption "qBittorrent using Docker";
|
exposePorts = lib.mkOption {
|
||||||
radarr.enable = lib.mkEnableOption "Radarr using Docker";
|
type = lib.types.bool;
|
||||||
sonarr.enable = lib.mkEnableOption "Sonarr using Docker";
|
description = "Expose Bazarr port";
|
||||||
|
default = cfg.exposePorts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
prowlarr = {
|
||||||
|
enable = lib.mkEnableOption "Prowlarr using Docker";
|
||||||
|
exposePorts = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Expose Prowlarr port";
|
||||||
|
default = cfg.exposePorts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
qbittorrent = {
|
||||||
|
enable = lib.mkEnableOption "qBittorrent using Docker";
|
||||||
|
exposePorts = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Expose qBittorrent port";
|
||||||
|
default = cfg.exposePorts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
radarr = {
|
||||||
|
enable = lib.mkEnableOption "Radarr using Docker";
|
||||||
|
exposePorts = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Expose Radarr port";
|
||||||
|
default = cfg.exposePorts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
sonarr = {
|
||||||
|
enable = lib.mkEnableOption "Sonarr using Docker";
|
||||||
|
exposePorts = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Expose Sonarr port";
|
||||||
|
default = cfg.exposePorts;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -204,10 +245,9 @@ in {
|
||||||
hostname = "bazarr";
|
hostname = "bazarr";
|
||||||
image = "ghcr.io/hotio/bazarr:release-1.4.4";
|
image = "ghcr.io/hotio/bazarr:release-1.4.4";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = [
|
ports = lib.mkIf cfg.bazarr.exposePorts [
|
||||||
# Open ports if you don't use Traefik
|
"${toString port}:${toString port}/tcp"
|
||||||
# "${toString port}:${toString port}/tcp"
|
"${toString port}:${toString port}/udp"
|
||||||
# "${toString port}:${toString port}/udp"
|
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
@ -241,9 +281,8 @@ in {
|
||||||
hostname = "prowlarr";
|
hostname = "prowlarr";
|
||||||
image = "ghcr.io/hotio/prowlarr:release-1.23.1.4708";
|
image = "ghcr.io/hotio/prowlarr:release-1.23.1.4708";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = [
|
ports = lib.mkIf cfg.prowlarr.exposePorts [
|
||||||
# Open ports if you don't use Traefik
|
"${toString port}:${toString port}/tcp"
|
||||||
# "${toString port}:${toString port}/tcp"
|
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
@ -273,10 +312,9 @@ in {
|
||||||
hostname = "qbittorrent";
|
hostname = "qbittorrent";
|
||||||
image = "ghcr.io/hotio/qbittorrent:release-4.6.7";
|
image = "ghcr.io/hotio/qbittorrent:release-4.6.7";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = [
|
ports = lib.mkIf cfg.qbittorrent.exposePorts [
|
||||||
# Open ports if you don't use Traefik
|
"${toString port}:${toString port}/tcp"
|
||||||
# "${toString port}:${toString port}/tcp"
|
"${toString port}:${toString port}/udp"
|
||||||
# "${toString port}:${toString port}/udp"
|
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
@ -307,9 +345,8 @@ in {
|
||||||
hostname = "radarr";
|
hostname = "radarr";
|
||||||
image = "ghcr.io/hotio/radarr:release-5.9.1.9070";
|
image = "ghcr.io/hotio/radarr:release-5.9.1.9070";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = [
|
ports = lib.mkIf cfg.radarr.exposePorts [
|
||||||
# Open ports if you don't use Traefik
|
"${toString port}:${toString port}/tcp"
|
||||||
# "${toString port}:${toString port}/tcp"
|
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
@ -342,9 +379,8 @@ in {
|
||||||
hostname = "sonarr";
|
hostname = "sonarr";
|
||||||
image = "ghcr.io/hotio/sonarr:release-4.0.9.2244";
|
image = "ghcr.io/hotio/sonarr:release-4.0.9.2244";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = [
|
ports = lib.mkIf cfg.sonarr.exposePorts [
|
||||||
# Open ports if you don't use Traefik
|
"${toString port}:${toString port}/tcp"
|
||||||
# "${toString port}:${toString port}/tcp"
|
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue