masive rewriting and setup of server files
This commit is contained in:
@@ -2,20 +2,27 @@
|
||||
lib,
|
||||
config,
|
||||
proxyReverseArr,
|
||||
setup,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.servers.prowlarr;
|
||||
in
|
||||
{
|
||||
options.my.servers.prowlarr.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.servers.prowlarr.enable {
|
||||
users.users.prowlarr = {
|
||||
options.my.servers.prowlarr = setup.mkOptions "prowlarr" "indexer" 9696;
|
||||
config = {
|
||||
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
|
||||
users.users.prowlarr = lib.mkIf cfg.enable {
|
||||
group = "piracy";
|
||||
isSystemUser = true;
|
||||
};
|
||||
services = {
|
||||
prowlarr.enable = true;
|
||||
nginx.virtualHosts."indexer.${config.my.domain}" = proxyReverseArr 9696 // { };
|
||||
prowlarr.enable = cfg.enable;
|
||||
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||
proxyReverseArr cfg.hostName cfg.port // { }
|
||||
);
|
||||
};
|
||||
virtualisation.oci-containers.containers.flaresolverr = {
|
||||
virtualisation.oci-containers.containers.flaresolverr = lib.mkIf cfg.enable {
|
||||
autoStart = true;
|
||||
image = "ghcr.io/flaresolverr/flaresolverr:latest";
|
||||
ports = [ "8191:8191" ];
|
||||
|
||||
Reference in New Issue
Block a user