Skip to content

Commit

Permalink
nixos/prowlarr: add settings option
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey committed Feb 21, 2025
1 parent 385d0c7 commit 2126e64
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nixos/modules/services/misc/prowlarr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}:
let
cfg = config.services.prowlarr;

servarr = import ./servarr/settings-options.nix { inherit lib pkgs; };
in
{
options = {
Expand All @@ -20,6 +20,8 @@ in
default = false;
description = "Open ports in the firewall for the Prowlarr web interface.";
};

settings = servarr.mkServarrSettingsOptions "prowlarr" 9696;
};
};

Expand All @@ -28,6 +30,9 @@ in
description = "Prowlarr";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = servarr.mkServarrSettingsEnvVars "PROWLARR" cfg.settings // {
HOME = "/var/empty";
};

serviceConfig = {
Type = "simple";
Expand All @@ -36,11 +41,10 @@ in
ExecStart = "${lib.getExe cfg.package} -nobrowser -data=/var/lib/prowlarr";
Restart = "on-failure";
};
environment.HOME = "/var/empty";
};

networking.firewall = lib.mkIf cfg.openFirewall {
allowedTCPPorts = [ 9696 ];
allowedTCPPorts = [ cfg.settings.server.port ];
};
};
}

0 comments on commit 2126e64

Please sign in to comment.