Simon Bruder
16cf73afb9
Previously, it was hosted on Ionos’s VMware-based infrastructure. I already had a VPS on their new KVM-based infrastructure, as I was planning to migrate okarin to it eventually (as it is cheaper). However, the new infrastructure does not offer PTR records for IPv6 addresses. Therefore, I was waiting until they would implement that feature (as the support promised me they would to in the near future). However, they are now migrating the (at least my) guests from their VMware hypervisors onto the KVM ones, assigning new IPv6 addresses to them. This makes the old VPS essentially the same as the old one, but with less memory and more expensive. So I decided to migrate now.
25 lines
492 B
Nix
25 lines
492 B
Nix
# SPDX-FileCopyrightText: 2023 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
{ lib, ... }:
|
|
let
|
|
proxyMap = {
|
|
"sbruder.xyz" = "renge";
|
|
"iv.sbruder.xyz" = "renge";
|
|
};
|
|
in
|
|
{
|
|
services.nginx.virtualHosts = lib.mapAttrs
|
|
(host: target: {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
|
|
locations."/".extraConfig = ''
|
|
proxy_pass http://${target}.vpn.sbruder.de/;
|
|
proxy_set_header Host ${host};
|
|
'';
|
|
})
|
|
proxyMap;
|
|
}
|