feat: add Prowlarr service module with configuration options
This commit is contained in:
parent
296609fdfb
commit
35035111e7
@ -2,6 +2,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./gitea
|
./gitea
|
||||||
./immich
|
./immich
|
||||||
|
./prowlarr
|
||||||
./radarr
|
./radarr
|
||||||
./sonarr
|
./sonarr
|
||||||
];
|
];
|
||||||
|
38
modules/services/prowlarr/default.nix
Normal file
38
modules/services/prowlarr/default.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user