ombi init
This commit is contained in:
parent
7bfced223f
commit
0c53111b51
20
modules/servers/ombi.nix
Normal file
20
modules/servers/ombi.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ 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.hostName cfg.port // { }
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user