nix-infra/config/hosts/web-public-2/virtualHosts/acme-challenge.nix

32 lines
1,006 B
Nix
Raw Normal View History

2023-08-01 23:02:11 +02:00
{ ... }:
let
acmeDomainMap = {
"jellyfin.grzb.de" = "jellyfin.vs.grzb.de";
"mail-1.grzb.de" = "mail-1.vs.grzb.de";
"matrix.nekover.se" = "matrix.vs.grzb.de";
"netbox.grzb.de" = "netbox.vs.grzb.de";
2024-01-28 03:31:28 +01:00
"git.nekover.se" = "forgejo.vs.grzb.de";
"grafana.grzb.de" = "metrics.vs.grzb.de";
"jackett.grzb.de" = "torrent.vs.grzb.de";
2024-01-14 00:22:58 +01:00
"jellyseerr.grzb.de" = "jellyseerr.vs.grzb.de";
2024-01-19 12:15:00 +01:00
"keycloak-admin.nekover.se" = "keycloak.vs.grzb.de";
"radarr.grzb.de" = "torrent.vs.grzb.de";
2023-10-16 11:22:48 +02:00
"searx.nekover.se" = "searx.vs.grzb.de";
"social.nekover.se" = "mastodon.vs.grzb.de";
"sonarr.grzb.de" = "torrent.vs.grzb.de";
"torrent.grzb.de" = "torrent.vs.grzb.de";
"turn.nekover.se" = "coturn.vs.grzb.de";
};
in
2023-08-01 23:02:11 +02:00
{
services.nginx.virtualHosts = (builtins.mapAttrs (domain: target: {
listen = [{
addr = "0.0.0.0";
port = 80;
}];
locations."^~ /.well-known/acme-challenge/" = {
proxyPass = "http://${target}:80";
2023-08-05 04:47:14 +02:00
};
}) acmeDomainMap);
2023-08-01 23:02:11 +02:00
}