1 { config, pkgs, lib, ... }:
6 cfg = config.services.prowlarr;
12 enable = mkEnableOption "Prowlarr, an indexer manager/proxy for Torrent trackers and Usenet indexers";
14 package = mkPackageOption pkgs "prowlarr" { };
16 openFirewall = mkOption {
19 description = "Open ports in the firewall for the Prowlarr web interface.";
24 config = mkIf cfg.enable {
25 systemd.services.prowlarr = {
26 description = "Prowlarr";
27 after = [ "network.target" ];
28 wantedBy = [ "multi-user.target" ];
33 StateDirectory = "prowlarr";
34 ExecStart = "${lib.getExe cfg.package} -nobrowser -data=/var/lib/prowlarr";
35 Restart = "on-failure";
37 environment.HOME = "/var/empty";
40 networking.firewall = mkIf cfg.openFirewall {
41 allowedTCPPorts = [ 9696 ];