migrated lambdas to setup.nix + lambda for server files

This commit is contained in:
2024-10-02 18:16:06 -06:00
parent 6181709ca3
commit ef00d45148
21 changed files with 118 additions and 347 deletions

View File

@@ -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 // { };
};
};
};