configuration.nix/hosts/layne/services/apps/prowlarr.nix

32 lines
745 B
Nix
Raw Normal View History

2024-11-01 15:42:03 +05:30
{ pkgs, lib, ... }:
let
user = "mediaserver";
group = "mediaserver";
dataDir = "/mnt/data/prowlarr";
in
{
services.caddy.virtualHosts."prowlarr.labs.adtya.xyz" = {
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" ];
2024-11-01 19:20:53 +05:30
unitConfig.RequiresMountsFor = [ "/mnt/data" ];
2024-11-01 15:42:03 +05:30
serviceConfig = {
Type = "simple";
User = user;
Group = group;
ExecStart = "${lib.getExe pkgs.prowlarr} -nobrowser -data='${dataDir}'";
Restart = "on-failure";
};
};
}