ingress-proxy+lab-lapha

This commit is contained in:
41666 2023-12-28 16:34:48 -05:00
parent b01c406f4a
commit 227c8b14e9
6 changed files with 178 additions and 50 deletions

View file

@ -0,0 +1,67 @@
{ lib, ... }: let
tsHost = x: "http://${x}.hoki-porgy.ts.net";
aliases = x: { serverAliases = x; };
routes = [
{
host = "warme.st";
target = tsHost "honeydew";
extra = aliases [ "colde.st" ];
}
{
host = "saerro.ps2.live";
target = tsHost "durian";
extra = aliases [ "agg.ps2.live" "metagame.ps2.live" ];
}
{
host = "mx.sapphic.engineer";
target = tsHost "mango";
extra = aliases [ "i.mx.sapphic.engineer" ];
}
{
host = "static-sites.foxxolay.net";
target = tsHost "juniper";
extra = aliases [
"mekanoe.com"
"foxxolay.com"
"foxxolay.net"
"inaayoka.com"
"kat.cafe"
];
}
{
host = "ml.colde.st";
target = tsHost "lab-alpha";
}
];
proxyConfig = {
forceSSL = true;
useHTTP3 = true;
useHTTP2 = true;
enableACME = true;
};
virtualHosts = map (x:
lib.nameValuePair
x.host
({ locations."/".proxyPass = x.target; } // proxyConfig // x.extra)
) routes;
in {
imports = [
../../templates/proxmox-lxc.nix
../../server.nix
../../features/dns-cache.nix
../../features/nginx.nix
];
networking.hostName = "ingress-proxy";
system.stateVersion = "24.05";
nixpkgs.hostPlatform = "x86_64-linux";
services.nginx = {
inherit virtualHosts;
recommendedTlsSettings = true;
};
}

View file

@ -0,0 +1,17 @@
{ ... }: {
imports = [
../../templates/proxmox-lxc.nix
../../server.nix
../../features/dns-cache.nix
../../features/nginx.nix
];
networking.hostName = "lab-alpha";
system.stateVersion = "24.05";
nixpkgs.hostPlatform = "x86_64-linux";
services.mastodon = {
enable = true;
configureNginx = true;
};
}