feat: Configure *arr stack
This commit is contained in:
parent
32849cc5d2
commit
217fee5b3f
1 changed files with 183 additions and 45 deletions
|
|
@ -42,6 +42,104 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = lib.mkIf inUse {
|
fileSystems = lib.mkIf inUse {
|
||||||
|
"/srv/bazarr-backup" = lib.mkIf cfg.bazarr.enable {
|
||||||
|
device = "192.168.0.11:/mnt/BIG/BACKUP/BAZARR";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"auto"
|
||||||
|
"nfsvers=4.2"
|
||||||
|
"rsize=1048576" "wsize=1048576"
|
||||||
|
"hard"
|
||||||
|
"timeo=600" "retrans=2"
|
||||||
|
"_netdev" "nosuid" "tcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/srv/lidarr-backup" = lib.mkIf cfg.lidarr.enable {
|
||||||
|
device = "192.168.0.11:/mnt/BIG/BACKUP/LIDARR";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"auto"
|
||||||
|
"nfsvers=4.2"
|
||||||
|
"rsize=1048576" "wsize=1048576"
|
||||||
|
"hard"
|
||||||
|
"timeo=600" "retrans=2"
|
||||||
|
"_netdev" "nosuid" "tcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/srv/prowlarr-backup" = lib.mkIf cfg.prowlarr.enable {
|
||||||
|
device = "192.168.0.11:/mnt/BIG/BACKUP/PROWLARR";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"auto"
|
||||||
|
"nfsvers=4.2"
|
||||||
|
"rsize=1048576" "wsize=1048576"
|
||||||
|
"hard"
|
||||||
|
"timeo=600" "retrans=2"
|
||||||
|
"_netdev" "nosuid" "tcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/srv/qbittorrent" = lib.mkIf cfg.qbittorrent.enable {
|
||||||
|
device = "192.168.0.11:/mnt/SMALL/CONFIG/QBITTORRENT";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"auto"
|
||||||
|
"nfsvers=4.2"
|
||||||
|
"rsize=1048576" "wsize=1048576"
|
||||||
|
"hard"
|
||||||
|
"timeo=600" "retrans=2"
|
||||||
|
"_netdev" "nosuid" "tcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/srv/radarr-backup" = lib.mkIf cfg.radarr.enable {
|
||||||
|
device = "192.168.0.11:/mnt/BIG/BACKUP/RADARR";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"auto"
|
||||||
|
"nfsvers=4.2"
|
||||||
|
"rsize=1048576" "wsize=1048576"
|
||||||
|
"hard"
|
||||||
|
"timeo=600" "retrans=2"
|
||||||
|
"_netdev" "nosuid" "tcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/srv/sonarr-backup" = lib.mkIf cfg.sonarr.enable {
|
||||||
|
device = "192.168.0.11:/mnt/BIG/BACKUP/SONARR";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"auto"
|
||||||
|
"nfsvers=4.2"
|
||||||
|
"rsize=1048576" "wsize=1048576"
|
||||||
|
"hard"
|
||||||
|
"timeo=600" "retrans=2"
|
||||||
|
"_netdev" "nosuid" "tcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"/srv/torrent" = {
|
||||||
|
device = "192.168.0.11:/mnt/SMALL/MEDIA/TORRENT";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"auto"
|
||||||
|
"nfsvers=4.2"
|
||||||
|
"rsize=1048576" "wsize=1048576"
|
||||||
|
"hard"
|
||||||
|
"timeo=600" "retrans=2"
|
||||||
|
"_netdev" "nosuid" "tcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
"/srv/video" = {
|
"/srv/video" = {
|
||||||
device = "192.168.0.11:/mnt/SMALL/MEDIA/VIDEO";
|
device = "192.168.0.11:/mnt/SMALL/MEDIA/VIDEO";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
@ -55,20 +153,6 @@ in {
|
||||||
"_netdev" "nosuid" "tcp"
|
"_netdev" "nosuid" "tcp"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/srv/qbittorrent" = {
|
|
||||||
device = "192.168.0.11:/mnt/SMALL/CONFIG/QBITTORRENT";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [
|
|
||||||
"rw"
|
|
||||||
"auto"
|
|
||||||
"nfsvers=4.2"
|
|
||||||
"hard"
|
|
||||||
"rsize=1048576" "wsize=1048576"
|
|
||||||
"timeo=600" "retrans=2"
|
|
||||||
"_netdev" "nosuid" "tcp"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make sure the Docker network exists.
|
# Make sure the Docker network exists.
|
||||||
|
|
@ -143,42 +227,53 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
bazarr = lib.mkIf cfg.bazarr.enable {
|
bazarr = let
|
||||||
|
port = 6767;
|
||||||
|
in lib.mkIf cfg.bazarr.enable {
|
||||||
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 = [
|
||||||
"6767:6767/tcp"
|
# Open ports if you don't use Traefik
|
||||||
"6767:6767/udp"
|
# "${toString port}:${toString port}/tcp"
|
||||||
|
# "${toString port}:${toString port}/udp"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
||||||
"--mount" ''type=volume,source=bazarr-backup,target=/backup,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:/mnt/BIG/BACKUP/BAZARR,"volume-opt=o=addr=192.168.0.11,rw,nfsvers=4.2,async,nosuid"''
|
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = toString config.users.users.bazarr.uid;
|
PUID = toString config.users.users.bazarr.uid;
|
||||||
inherit PGID UMASK;
|
inherit PGID UMASK;
|
||||||
TZ = config.time.timeZone;
|
TZ = config.time.timeZone;
|
||||||
WEBUI_PORTS = "6767/tcp,6767/udp";
|
WEBUI_PORTS = "${toString port}/tcp,${toString port}/udp";
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"bazarr-config:/config"
|
"bazarr-config:/config"
|
||||||
"/srv/video:/data"
|
|
||||||
|
"/srv/bazarr-backup:/config/backup"
|
||||||
|
|
||||||
|
"/srv/video/Films:/media/movies"
|
||||||
|
"/srv/video/Series:/media/series"
|
||||||
];
|
];
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.bazarr.rule" = "Host(`bazarr.depeuter.dev`)";
|
||||||
|
"traefik.http.services.bazarr.loadbalancer.server.port" = toString port;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
lidarr = lib.mkIf cfg.lidarr.enable {
|
lidarr = let
|
||||||
|
port = 8686;
|
||||||
|
in lib.mkIf cfg.lidarr.enable {
|
||||||
hostname = "lidarr";
|
hostname = "lidarr";
|
||||||
image = "ghcr.io/hotio/lidarr:release-2.5.3.4341";
|
image = "ghcr.io/hotio/lidarr:release-2.5.3.4341";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
ports = [
|
ports = [
|
||||||
"8686:8686/tcp"
|
# Open ports if you don't use Traefik
|
||||||
|
# "${toString port}:${toString port}/tcp"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
||||||
"--mount" ''type=volume,source=lidarr-backup,target=/backup,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:/mnt/BIG/BACKUP/LIDARR,"volume-opt=o=addr=192.168.0.11,rw,nfsvers=4.2,async,nosuid"''
|
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = toString config.users.users.lidarr.uid;
|
PUID = toString config.users.users.lidarr.uid;
|
||||||
|
|
@ -187,16 +282,21 @@ in {
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"lidarr-config:/config"
|
"lidarr-config:/config"
|
||||||
# TODO "data:/data"
|
|
||||||
|
# TODO Fix path
|
||||||
|
"/srv/lidarr-backup:/media/Backups"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
prowlarr = lib.mkIf cfg.prowlarr.enable {
|
prowlarr = let
|
||||||
|
port = 9696;
|
||||||
|
in lib.mkIf cfg.prowlarr.enable {
|
||||||
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 = [
|
||||||
"9696:9696/tcp"
|
# Open ports if you don't use Traefik
|
||||||
|
# "${toString port}:${toString port}/tcp"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
@ -207,41 +307,58 @@ in {
|
||||||
TZ = config.time.timeZone;
|
TZ = config.time.timeZone;
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
# TODO "config:/config"
|
"prowlarr-config:/config"
|
||||||
|
|
||||||
|
"/srv/prowlarr-backup:/config/Backups"
|
||||||
];
|
];
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.prowlarr.rule" = "Host(`prowlarr.depeuter.dev`)";
|
||||||
|
"traefik.http.services.prowlarr.loadbalancer.server.port" = toString port;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
qbittorrent = lib.mkIf cfg.qbittorrent.enable {
|
qbittorrent = let
|
||||||
|
port = 10095;
|
||||||
|
in lib.mkIf cfg.qbittorrent.enable {
|
||||||
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 = [
|
||||||
"10095:10095/udp"
|
# Open ports if you don't use Traefik
|
||||||
"10095:10095/tcp"
|
# "${toString port}:${toString port}/tcp"
|
||||||
|
# "${toString port}:${toString port}/udp"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
||||||
"--mount" ''type=volume,source=torrents,target=/data,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:/mnt/SMALL/MEDIA/TORRENT,"volume-opt=o=addr=192.168.0.11,rw,auto,nfsvers=4.2,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,_netdev,nosuid,tcp"''
|
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
PUID = toString config.users.users.qbittorrent.uid;
|
PUID = toString config.users.users.qbittorrent.uid;
|
||||||
inherit PGID UMASK;
|
inherit PGID UMASK;
|
||||||
TZ = config.time.timeZone;
|
TZ = config.time.timeZone;
|
||||||
WEBUI_PORTS = "10095/tcp,10095/udp";
|
WEBUI_PORTS = "${toString port}/tcp,${toString port}/udp";
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"/srv/qbittorrent:/config/config"
|
"/srv/qbittorrent:/config"
|
||||||
"/srv/video:/media/video"
|
|
||||||
|
"/srv/torrent:/media/cache"
|
||||||
];
|
];
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.qbittorrent.rule" = "Host(`qb.depeuter.dev`)";
|
||||||
|
"traefik.http.services.qbittorrent.loadbalancer.server.port" = toString port;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
radarr = lib.mkIf cfg.radarr.enable {
|
radarr = let
|
||||||
|
port = 7878;
|
||||||
|
in lib.mkIf cfg.radarr.enable {
|
||||||
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 = [
|
||||||
"7878:7878/tcp"
|
# Open ports if you don't use Traefik
|
||||||
|
# "${toString port}:${toString port}/tcp"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
@ -252,17 +369,29 @@ in {
|
||||||
TZ = config.time.timeZone;
|
TZ = config.time.timeZone;
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
# TODO "config:/config"
|
"radarr-config:/config"
|
||||||
# TODO "data:/data"
|
|
||||||
|
"/srv/radarr-backup:/config/Backups"
|
||||||
|
|
||||||
|
"/srv/torrent:/media/cache"
|
||||||
|
"/srv/video/Films:/media/movies"
|
||||||
];
|
];
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.radarr.rule" = "Host(`radarr.depeuter.dev`)";
|
||||||
|
"traefik.http.services.radarr.loadbalancer.server.port" = toString port;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sonarr = lib.mkIf cfg.sonarr.enable {
|
sonarr = let
|
||||||
|
port = 8989;
|
||||||
|
in lib.mkIf cfg.sonarr.enable {
|
||||||
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 = [
|
||||||
"8989:8989/tcp"
|
# Open ports if you don't use Traefik
|
||||||
|
# "${toString port}:${toString port}/tcp"
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${networkName}"
|
"--network=${networkName}"
|
||||||
|
|
@ -273,9 +402,18 @@ in {
|
||||||
TZ = config.time.timeZone;
|
TZ = config.time.timeZone;
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
# TODO "config:/config"
|
"sonarr-config:/config"
|
||||||
# TODO "data:/data"
|
|
||||||
|
"/srv/sonarr-backup:/config/Backups"
|
||||||
|
|
||||||
|
"/srv/torrent:/media/cache"
|
||||||
|
"/srv/video/Series:/media/series"
|
||||||
];
|
];
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.sonarr.rule" = "Host(`sonarr.depeuter.dev`)";
|
||||||
|
"traefik.http.services.sonarr.loadbalancer.server.port" = toString port;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue