2024-04-16 12:07:28 +02:00
|
|
|
# SPDX-FileCopyrightText: 2023-2024 Simon Bruder <simon@sbruder.de>
|
2024-01-06 01:19:35 +01:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2023-05-06 10:54:03 +02:00
|
|
|
{ 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;
|
|
|
|
}
|