diff --git a/hosts/layne/services/apps/default.nix b/hosts/layne/services/apps/default.nix index 97f7b20..0ba33e0 100644 --- a/hosts/layne/services/apps/default.nix +++ b/hosts/layne/services/apps/default.nix @@ -6,6 +6,7 @@ _: { ./sonarr.nix ./readarr.nix ./jackett.nix + ./prowlarr.nix ../../../shared/prometheus-exporters.nix ../../../shared/promtail.nix ]; diff --git a/hosts/layne/services/apps/prowlarr.nix b/hosts/layne/services/apps/prowlarr.nix new file mode 100644 index 0000000..edbd081 --- /dev/null +++ b/hosts/layne/services/apps/prowlarr.nix @@ -0,0 +1,33 @@ +{ pkgs, lib, ... }: +let + inherit (import ../../../shared/caddy-helpers.nix) logFormat; + user = "mediaserver"; + group = "mediaserver"; + dataDir = "/mnt/data/prowlarr"; +in +{ + services.caddy.virtualHosts."prowlarr.labs.adtya.xyz" = { + inherit logFormat; + extraConfig = '' + reverse_proxy 127.0.0.1:9696 + ''; + }; + systemd.tmpfiles.settings."10-prowlarr".${dataDir}.d = { + inherit user group; + mode = "0700"; + }; + + systemd.services.prowlarr = { + description = "Prowlarr"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + Type = "simple"; + User = user; + Group = group; + ExecStart = "${lib.getExe pkgs.prowlarr} -nobrowser -data='${dataDir}'"; + Restart = "on-failure"; + }; + }; +} diff --git a/hosts/shared/blocky.nix b/hosts/shared/blocky.nix index f3f9500..fa61a20 100644 --- a/hosts/shared/blocky.nix +++ b/hosts/shared/blocky.nix @@ -75,6 +75,7 @@ "jellyfin.labs.adtya.xyz" = "10.10.10.14"; "loki.labs.adtya.xyz" = "10.10.10.11"; "prometheus.labs.adtya.xyz" = "10.10.10.11"; + "prowlarr.labs.adtya.xyz" = "10.10.10.14"; "radarr.labs.adtya.xyz" = "10.10.10.14"; "readarr.labs.adtya.xyz" = "10.10.10.14"; "sonarr.labs.adtya.xyz" = "10.10.10.14";