feat: add Prowlarr service module with configuration options

This commit is contained in:
Giulio De Pasquale (aider) 2025-04-26 16:50:42 +01:00
parent 296609fdfb
commit 35035111e7
2 changed files with 39 additions and 0 deletions

View File

@ -2,6 +2,7 @@
imports = [
./gitea
./immich
./prowlarr
./radarr
./sonarr
];

View File

@ -0,0 +1,38 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf;
cfg = config.pepe.services.prowlarr;
in
{
options.pepe.services.prowlarr = with lib; {
enable = mkEnableOption "Enable prowlarr";
package = mkPackageOption pkgs "prowlarr" { };
domain = mkOption {
type = types.str;
default = null;
};
};
config = mkIf cfg.enable {
services.prowlarr = {
enable = true;
package = cfg.package;
};
architect.vhost.${cfg.domain} = with config.architect.networks; {
dnsInterfaces = [ "tailscale" "lan" ];
locations."/" = {
port = 9696;
allowLan = true;
proxyWebsockets = true;
allow = [
tailscale.net
];
};
};
pepe.core.media.groupMembers = mkIf config.pepe.core.media.enable [ "prowlarr" ];
};
}