migrated lambdas to setup.nix + lambda for server files
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
proxyReverse,
|
||||
setup,
|
||||
...
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.servers.flame;
|
||||
cfgS = config.my.servers.flameSecret;
|
||||
enable = (cfg.enable || cfgS.enable);
|
||||
setup = import ../setup.nix { inherit lib config; };
|
||||
in
|
||||
{
|
||||
options.my.servers = {
|
||||
@@ -52,8 +47,8 @@ in
|
||||
};
|
||||
services.nginx = {
|
||||
virtualHosts = lib.mkIf (cfg.enableProxy || cfgS.enableProxy) {
|
||||
"${cfg.host}" = proxyReverse cfg.hostName cfg.port // { };
|
||||
"${cfgS.host}" = proxyReverse cfgS.hostName cfgS.port // { };
|
||||
"${cfg.host}" = setup.proxyReverse cfg.hostName cfg.port // { };
|
||||
"${cfgS.host}" = setup.proxyReverse cfgS.hostName cfgS.port // { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user