masive rewriting and setup of server files
This commit is contained in:
@@ -2,17 +2,24 @@
|
||||
lib,
|
||||
config,
|
||||
proxyReverseArr,
|
||||
setup,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.servers.radarr;
|
||||
in
|
||||
{
|
||||
options.my.servers.radarr.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.servers.radarr.enable {
|
||||
options.my.servers.radarr = setup.mkOptions "radarr" "movies" 7878;
|
||||
config = {
|
||||
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
|
||||
services = {
|
||||
radarr = {
|
||||
radarr = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
group = "piracy";
|
||||
};
|
||||
nginx.virtualHosts."movies.${config.my.domain}" = proxyReverseArr 7878 // { };
|
||||
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||
proxyReverseArr cfg.hostName cfg.port // { }
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user