layne: setup prowlarr

This commit is contained in:
Adithya 2024-11-01 15:42:03 +05:30
parent 353481f3f2
commit 9bab433d0c
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 35 additions and 0 deletions

View file

@ -6,6 +6,7 @@ _: {
./sonarr.nix
./readarr.nix
./jackett.nix
./prowlarr.nix
../../../shared/prometheus-exporters.nix
../../../shared/promtail.nix
];

View file

@ -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";
};
};
}

View file

@ -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";