Files
nix-dotfiles/systems/palatine-hill/docker/arr.nix

200 lines
5.3 KiB
Nix
Raw Normal View History

{
config,
lib,
...
}:
let
vars = import ../vars.nix;
2025-12-13 23:00:30 -05:00
arr_postgres_config =
container_type:
let
ctype = lib.strings.toUpper container_type;
in
{
"${ctype}__POSTGRES__HOST" = "host.docker.internal";
"${ctype}__POSTGRES__USER" = "SOPS_ONLY";
"${ctype}__POSTGRES__PASSWORD" = "SOPS_ONLY";
"${ctype}__POSTGRES__PORT" = toString config.services.postgresql.settings.port;
};
in
{
2025-12-13 23:16:13 -05:00
# Notes:
# Jellyplex-watched - sync watch status between plex and jellyfin as long as users and library is the same
# Tdarr - for distributed transcoding?
#
# list of containers supporting postgres:
# bazarr:
# POSTGRES_ENABED: true
# POSTGRES_HOST:
# POSTGRES_PORT:
# POSTGRES_DATABASE: bazarr
# POSTGRES_USERNAME: arr
# POSTGRES_PASSWORD: sops
# prowlarr:
# see ctype
# radarr:
# see ctype
# sonarr:
# see ctype
# lidarr:
# see ctype
# jellyseerr:
# DB_TYPE: postgres
# DB_HOST:
# DB_PORT:
# DB_USER: arr
# DB_PASS: sops
# DB_NAME: jellyseerr
#
virtualisation.oci-containers.containers = {
bazarr = {
image = "ghcr.io/linuxserver/bazarr:latest";
ports = [ "6767:6767" ];
environment = {
PUID = "600";
PGID = "100";
TZ = "America/New_York";
2025-12-13 23:00:30 -05:00
POSTGRES_HOST = "host.docker.internal";
POSTGRES_USER = "SOPS_ONLY";
POSTGRES_PASSWORD = "SOPS_ONLY";
POSTGRES_PORT = toString config.services.postgresql.settings.port;
};
volumes = [
"${vars.primary_docker}/bazarr:/config"
"${vars.primary_plex_storage}/data:/data"
];
2025-12-13 23:00:30 -05:00
extraOptions = [
"--network=arrnet"
"--add-host=host.docker.internal:host-gateway"
];
autoStart = true;
};
prowlarr = {
image = "ghcr.io/linuxserver/prowlarr:latest";
ports = [ "9696:9696" ];
environment = {
PUID = "600";
PGID = "100";
TZ = "America/New_York";
2025-12-13 23:00:30 -05:00
}
// arr_postgres_config "prowlarr";
2025-12-08 17:33:16 -05:00
extraOptions = [ "--network=arrnet" ];
volumes = [ "${vars.primary_docker}/prowlarr:/config" ];
autoStart = true;
};
radarr = {
image = "ghcr.io/linuxserver/radarr:latest";
ports = [ "7878:7878" ];
environment = {
PUID = "600";
PGID = "100";
TZ = "America/New_York";
2025-12-13 23:00:30 -05:00
}
// arr_postgres_config "radarr";
volumes = [
"${vars.primary_docker}/radarr:/config"
"${vars.primary_plex_storage}/data:/data"
];
2025-12-08 17:33:16 -05:00
extraOptions = [ "--network=arrnet" ];
autoStart = true;
};
sonarr = {
image = "ghcr.io/linuxserver/sonarr:latest";
ports = [ "8989:8989" ];
environment = {
PUID = "600";
PGID = "100";
TZ = "America/New_York";
2025-12-13 23:00:30 -05:00
}
// arr_postgres_config "sonarr";
volumes = [
"${vars.primary_docker}/sonarr:/config"
"${vars.primary_plex_storage}/data:/data"
];
2025-12-08 17:33:16 -05:00
extraOptions = [ "--network=arrnet" ];
autoStart = true;
};
lidarr = {
image = "ghcr.io/linuxserver/lidarr:latest";
ports = [ "8686:8686" ];
environment = {
PUID = "600";
PGID = "100";
TZ = "America/New_York";
2025-12-13 23:00:30 -05:00
}
// arr_postgres_config "lidarr";
volumes = [
"${vars.primary_docker}/lidarr:/config"
"${vars.primary_plex_storage}/data:/data"
];
2025-12-08 17:33:16 -05:00
extraOptions = [ "--network=arrnet" ];
autoStart = true;
};
2025-10-28 14:44:42 -04:00
unpackerr = {
image = "golift/unpackerr:latest";
user = "600:100";
environment = {
TZ = "America/New_York";
};
volumes = [
2025-10-28 14:44:42 -04:00
"${vars.primary_docker}/unpackerr:/config"
"${vars.primary_plex_storage}:/data"
];
2025-12-08 17:33:16 -05:00
extraOptions = [ "--network=arrnet" ];
autoStart = true;
};
2025-10-28 14:44:42 -04:00
notifiarr = {
image = "golift/notifiarr:latest";
2025-12-07 22:41:01 -05:00
ports = [ "5454:5454" ];
user = "600:100";
environment = {
TZ = "America/New_York";
2025-12-13 23:00:30 -05:00
}
// arr_postgres_config "notifiarr";
2025-12-07 22:08:15 -05:00
environmentFiles = [ config.sops.secrets."docker/notifiarr".path ];
volumes = [
2025-10-28 14:44:42 -04:00
"${vars.primary_docker}/notifiarr:/config"
"${vars.primary_plex_storage}:/data"
];
2025-12-08 17:33:16 -05:00
extraOptions = [ "--network=arrnet" ];
autoStart = true;
};
2025-12-08 17:33:16 -05:00
jellyseerr = {
image = "fallenbagel/jellyseerr:latest";
environment = {
PUID = "600";
PGID = "100";
TZ = "America/New_York";
2025-12-13 23:00:30 -05:00
DB_TYPE = "postgres";
DB_HOST = "host.docker.internal";
DB_PORT = toString config.services.postgresql.settings.port;
DB_USER = "SOPS_ONLY";
DB_PASS = "SOPS_ONLY";
};
volumes = [ "${vars.primary_docker}/overseerr:/config" ];
# TODO: remove ports later since this is going through web
2025-12-08 17:33:16 -05:00
extraOptions = [
"--network=arrnet"
"--network=haproxy-net"
2025-12-08 17:42:15 -05:00
# "--health-cmd \"wget --no-verbose --tries 1 --spider http://localhost:5055/api/v1/status || exit 1\""
# "--health-start-period 20s"
# "--health-timeout 3s"
# "--health-interval 15s"
# "--health-retries 3"
2025-12-08 17:33:16 -05:00
];
ports = [ "5055:5055" ]; # Web UI port
dependsOn = [
"radarr"
"sonarr"
];
autoStart = true;
};
};
2025-12-07 22:08:15 -05:00
sops = {
secrets = {
"docker/notifiarr".owner = "docker-service";
};
};
}