19 lines
462 B
Nix
19 lines
462 B
Nix
{ lib, config, ... }:
|
|
let
|
|
cfg = config.my.servers.ombi;
|
|
setup = import ./setup.nix { inherit lib config; };
|
|
in
|
|
{
|
|
options.my.servers.ombi = setup.mkOptions "ombi" "requests" 3425;
|
|
config = {
|
|
services = {
|
|
ombi = lib.mkIf cfg.enable {
|
|
enable = true;
|
|
port = cfg.port;
|
|
openFirewall = (!cfg.isLocal);
|
|
};
|
|
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg // { });
|
|
};
|
|
};
|
|
}
|