36 lines
722 B
Nix
36 lines
722 B
Nix
{ 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;
|
|
};
|
|
|
|
pepe.core.vhost.hosts.${cfg.domain} = {
|
|
locations."/" = {
|
|
port = 9696;
|
|
allowLAN = true;
|
|
allowVPN = true;
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
|
|
pepe.core.media.groupMembers = mkIf config.pepe.core.media.enable [ "prowlarr" ];
|
|
};
|
|
}
|