diff --git a/devices/nas/modules/arion/default.nix b/devices/nas/modules/arion/default.nix index da9f8442..850aca75 100644 --- a/devices/nas/modules/arion/default.nix +++ b/devices/nas/modules/arion/default.nix @@ -15,6 +15,15 @@ in { ./resume/compose.nix ./vaultwarden/compose.nix ./wg-easy/compose.nix + + ./media/bazarr/compose.nix + ./media/calibre/compose.nix + ./media/joal/compose.nix + ./media/prowlarr/compose.nix + ./media/radarr/compose.nix + ./media/sabnzbd/compose.nix + ./media/seerr/compose.nix + ./media/sonarr/compose.nix ]; arion = { diff --git a/devices/nas/modules/arion/media/bazarr/compose.nix b/devices/nas/modules/arion/media/bazarr/compose.nix new file mode 100644 index 00000000..2b7b71fa --- /dev/null +++ b/devices/nas/modules/arion/media/bazarr/compose.nix @@ -0,0 +1,55 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/bazarr"; +in { + arion.projects."bazarr" = { + "bazarr" = { + image = ./images/bazarr.nix; + restart = "always"; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + }; + + ports = [ + "6767:6767" + ]; + + volumes = [ + "${rwPath}/data:/config" + "/data:/data" + ]; + + extraOptions = { + deploy.resources.limits.cpus = "0.5"; + }; + }; + + "bazarr-fr" = { + image = ./images/bazarr.nix; + restart = "always"; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + }; + + ports = [ + "6766:6767" + ]; + + volumes = [ + "${rwPath}/data-fr:/config" + "/data:/data" + ]; + + extraOptions = { + deploy.resources.limits.cpus = "0.5"; + }; + }; + }; +} diff --git a/devices/nas/modules/arion/media/bazarr/images/bazarr.nix b/devices/nas/modules/arion/media/bazarr/images/bazarr.nix new file mode 100644 index 00000000..b057c285 --- /dev/null +++ b/devices/nas/modules/arion/media/bazarr/images/bazarr.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "ghcr.io/linuxserver/bazarr"; + imageDigest = "sha256:d9cb62904760a40ade8642e70be8e78bccfc7b4301d5496626004444f4c32fb9"; + sha256 = "0glgmw3d6i58v9w8dpf46znrzv3zvcn27ffx0wlxagp19bapmnfd"; + finalImageName = "ghcr.io/linuxserver/bazarr"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/calibre/compose.nix b/devices/nas/modules/arion/media/calibre/compose.nix new file mode 100644 index 00000000..d6d58290 --- /dev/null +++ b/devices/nas/modules/arion/media/calibre/compose.nix @@ -0,0 +1,45 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/calibre"; +in { + arion.projects."calibre" = { + "calibre" = { + image = ./images/calibre.nix; + restart = "always"; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + }; + + volumes = ["${rwPath}/data-db:/config"]; + + ports = [ + "8580:8080" + #"8081:8081" + ]; + #network_mode = "host"; + }; + + "calibre-web" = { + image = ./images/calibre-web.nix; + restart = "always"; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + DOCKER_MODS = "linuxserver/mods:universal-calibre"; + }; + + volumes = [ + "${rwPath}/data-web:/config" + "${rwPath}/data-db/Calibre Library:/books" + ]; + + ports = ["8083:8083"]; + }; + }; +} diff --git a/devices/nas/modules/arion/media/calibre/images/calibre-web.nix b/devices/nas/modules/arion/media/calibre/images/calibre-web.nix new file mode 100644 index 00000000..e9235160 --- /dev/null +++ b/devices/nas/modules/arion/media/calibre/images/calibre-web.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "lscr.io/linuxserver/calibre-web"; + imageDigest = "sha256:ec747903809e544ff791a4c303bf575fa3848cdce1cb4c0f7e7071ec5adf7e2d"; + sha256 = "0l0gmh0dy3s91ksdm23igdiy6s9a284ka5kwgn0v1k3nlmpbqyqc"; + finalImageName = "lscr.io/linuxserver/calibre-web"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/calibre/images/calibre.nix b/devices/nas/modules/arion/media/calibre/images/calibre.nix new file mode 100644 index 00000000..523f8a42 --- /dev/null +++ b/devices/nas/modules/arion/media/calibre/images/calibre.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "lscr.io/linuxserver/calibre"; + imageDigest = "sha256:7c98c0a2c7ba1aba16d2f3f4aa9fd2a67798567d42db24a27f255df22356ea2b"; + sha256 = "03d8dvp25gzcyhiwjjhlzr0c614kn7fnqr1fkv6jrxpgs338pgpx"; + finalImageName = "lscr.io/linuxserver/calibre"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/joal/compose.nix b/devices/nas/modules/arion/media/joal/compose.nix new file mode 100644 index 00000000..c2c9c290 --- /dev/null +++ b/devices/nas/modules/arion/media/joal/compose.nix @@ -0,0 +1,21 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/joal"; +in { + arion.projects."joal"."joal" = { + image = ./images/joal.nix; + restart = "always"; + + volumes = ["${rwPath}/data:/data"]; + ports = ["5656:5656"]; + + command = [ + "--joal-conf=/data" + "--spring.main.web-environment=true" + "--server.port=5656" + "--joal.ui.path.prefix=joal" + "--joal.ui.secret-token=12345" + ]; + }; +} diff --git a/devices/nas/modules/arion/media/joal/images/joal.nix b/devices/nas/modules/arion/media/joal/images/joal.nix new file mode 100644 index 00000000..2a55bf3f --- /dev/null +++ b/devices/nas/modules/arion/media/joal/images/joal.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "anthonyraymond/joal"; + imageDigest = "sha256:832718170bd2d3da97de1216a6fd2f3caf2d5d56065336320780dadaf4952c1e"; + sha256 = "03wqqhpsjcdgr4q3n9vqyxb59324mxnwn8jn6kj2kb6zq8bz3qrj"; + finalImageName = "anthonyraymond/joal"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/prowlarr/compose.nix b/devices/nas/modules/arion/media/prowlarr/compose.nix new file mode 100644 index 00000000..47687cc8 --- /dev/null +++ b/devices/nas/modules/arion/media/prowlarr/compose.nix @@ -0,0 +1,37 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/prowlarr"; +in { + arion.projects."prowlarr" = { + "prowlarr" = { + image = ./images/prowlarr.nix; + restart = "always"; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + }; + + volumes = ["${rwPath}/data:/config"]; + ports = ["9696:9696"]; + }; + + "flaresolverr" = { + image = ./images/flaresolverr.nix; + restart = "always"; + + environment = { + LOG_LEVEL = "info"; + LOG_HTML = "false"; + CAPTCHA_SOLVER = "none"; + TZ = "America/New_York"; + }; + + ports = ["8191:8191"]; + + depends_on = ["prowlarr"]; + }; + }; +} diff --git a/devices/nas/modules/arion/media/prowlarr/images/flaresolverr.nix b/devices/nas/modules/arion/media/prowlarr/images/flaresolverr.nix new file mode 100644 index 00000000..3b8d5763 --- /dev/null +++ b/devices/nas/modules/arion/media/prowlarr/images/flaresolverr.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "ghcr.io/flaresolverr/flaresolverr"; + imageDigest = "sha256:088412db1051d04ab32c902266510011aec1dc9f7a3a3bda3f58b93186591347"; + sha256 = "1x3s1qvzjz9kbxs829dyjp2m1fabmcvvi1n5z56j0dh1s0vcpb20"; + finalImageName = "ghcr.io/flaresolverr/flaresolverr"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/prowlarr/images/prowlarr.nix b/devices/nas/modules/arion/media/prowlarr/images/prowlarr.nix new file mode 100644 index 00000000..00c4e6e1 --- /dev/null +++ b/devices/nas/modules/arion/media/prowlarr/images/prowlarr.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "ghcr.io/linuxserver/prowlarr"; + imageDigest = "sha256:9c5d4a00141daab9e331bc998c35e4214db775a617ef2e629f606a5af7e40256"; + sha256 = "1xqxp0njpr3vhds0i5bas5yal5lj9rzls0x42wf05hyq4a5vk3jf"; + finalImageName = "ghcr.io/linuxserver/prowlarr"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/radarr/compose.nix b/devices/nas/modules/arion/media/radarr/compose.nix new file mode 100644 index 00000000..0000f1f5 --- /dev/null +++ b/devices/nas/modules/arion/media/radarr/compose.nix @@ -0,0 +1,27 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/radarr"; +in { + arion.projects."radarr"."radarr" = { + image = ./images/radarr.nix; + restart = "always"; + + ports = ["7878:7878"]; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + }; + + volumes = [ + "${rwPath}/data:/config" + "/data:/data" + ]; + + extraOptions = { + deploy.resources.limits.cpus = "0.5"; + }; + }; +} diff --git a/devices/nas/modules/arion/media/radarr/images/radarr.nix b/devices/nas/modules/arion/media/radarr/images/radarr.nix new file mode 100644 index 00000000..52c37e5e --- /dev/null +++ b/devices/nas/modules/arion/media/radarr/images/radarr.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "ghcr.io/linuxserver/radarr"; + imageDigest = "sha256:c092cf279e27359775a11dc9ce6cf2cf22975a36105c4f6214fa9df60cf0a1c4"; + sha256 = "0b9vjxrk8xwpab3g4dkrkc667g4d561m2s6hxx4yvb3gh9vnincd"; + finalImageName = "ghcr.io/linuxserver/radarr"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/sabnzbd/compose.nix b/devices/nas/modules/arion/media/sabnzbd/compose.nix new file mode 100644 index 00000000..abf210f9 --- /dev/null +++ b/devices/nas/modules/arion/media/sabnzbd/compose.nix @@ -0,0 +1,27 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/sabnzbd"; +in { + arion.projects."sabnzbd"."sabnzbd" = { + image = ./images/sabnzbd.nix; + restart = "always"; + + ports = ["8382:8082"]; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + }; + + volumes = [ + "${rwPath}/data:/config" + "/data:/data" + ]; + + extraOptions = { + deploy.resources.limits.cpus = "2"; + }; + }; +} diff --git a/devices/nas/modules/arion/media/sabnzbd/images/sabnzbd.nix b/devices/nas/modules/arion/media/sabnzbd/images/sabnzbd.nix new file mode 100644 index 00000000..adff7460 --- /dev/null +++ b/devices/nas/modules/arion/media/sabnzbd/images/sabnzbd.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "lscr.io/linuxserver/sabnzbd"; + imageDigest = "sha256:c3a1f221f147d499838540f120503be733b395fec632f9289c2acb0586cf0451"; + sha256 = "1albix8cax9ncvrpng95hmxig7kaxplz8yczl7sij7df72vmh81i"; + finalImageName = "lscr.io/linuxserver/sabnzbd"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/seerr/compose.nix b/devices/nas/modules/arion/media/seerr/compose.nix new file mode 100644 index 00000000..331b612f --- /dev/null +++ b/devices/nas/modules/arion/media/seerr/compose.nix @@ -0,0 +1,21 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/seerr"; +in { + arion.projects."seerr"."seerr" = { + image = ./images/jellyseerr.nix; + restart = "always"; + + environment = { + LOG_LEVEL = "debug"; + TZ = "America/New_York"; + }; + + volumes = [ + "${rwPath}/data:/app/config" + ]; + + ports = ["5055:5055"]; + }; +} diff --git a/devices/nas/modules/arion/media/seerr/images/jellyseerr.nix b/devices/nas/modules/arion/media/seerr/images/jellyseerr.nix new file mode 100644 index 00000000..3998f531 --- /dev/null +++ b/devices/nas/modules/arion/media/seerr/images/jellyseerr.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "fallenbagel/jellyseerr"; + imageDigest = "sha256:6dcdb5ba50913a14b2bd7df6388607ce175121f3416679c2746501256ac9f075"; + sha256 = "0bcs4dfw6n78yp1br0z5ra6bf6f5hppxrs86b3b6pszzlp3ijjfw"; + finalImageName = "fallenbagel/jellyseerr"; + finalImageTag = "latest"; +} diff --git a/devices/nas/modules/arion/media/sonarr/compose.nix b/devices/nas/modules/arion/media/sonarr/compose.nix new file mode 100644 index 00000000..a6824a51 --- /dev/null +++ b/devices/nas/modules/arion/media/sonarr/compose.nix @@ -0,0 +1,27 @@ +{config, ...}: let + inherit (config.arion) rwDataDir; + + rwPath = rwDataDir + "/media/sonarr"; +in { + arion.projects."sonarr"."sonarr" = { + image = ./images/sonarr.nix; + restart = "always"; + + ports = ["8989:8989"]; + + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "America/New_York"; + }; + + volumes = [ + "${rwPath}/data:/config" + "/data:/data" + ]; + + extraOptions = { + deploy.resources.limits.cpus = "0.5"; + }; + }; +} diff --git a/devices/nas/modules/arion/media/sonarr/images/sonarr.nix b/devices/nas/modules/arion/media/sonarr/images/sonarr.nix new file mode 100644 index 00000000..226598ad --- /dev/null +++ b/devices/nas/modules/arion/media/sonarr/images/sonarr.nix @@ -0,0 +1,8 @@ +pkgs: +pkgs.dockerTools.pullImage { + imageName = "lscr.io/linuxserver/sonarr"; + imageDigest = "sha256:c6945f08d8882923e12ad0f566d8f8546fd50226c21a247d0df5574dc9425f2a"; + sha256 = "1262xd4vqs6mf8l0fijxc5bl46cwpr46pma7d3458fizcv03rr64"; + finalImageName = "lscr.io/linuxserver/sonarr"; + finalImageTag = "latest"; +} diff --git a/modules/arion.nix b/modules/arion.nix index 57dfe398..cd4a72e1 100644 --- a/modules/arion.nix +++ b/modules/arion.nix @@ -86,13 +86,18 @@ in { mkForce (importImage v'.image); service = - (filterAttrs - (attrName: _: attrName != "image") - v') + (filterAttrs (attrName: _: + attrName != "image" && attrName != "extraOptions") + v') # By default set the container_name to the attrset's name // (optionalAttrs (! hasAttr "container_name" v') { container_name = n'; }); + + out.service = + optionalAttrs + (hasAttr "extraOptions" v') + v'.extraOptions; }) v; };