nix-config/hosts/public-access-proxy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

175 lines
4.7 KiB
Nix
Raw Normal View History

{ zentralwerk, config, hostRegistry, pkgs, lib, ... }:
{
2021-02-22 11:45:12 +01:00
imports = [
./proxy.nix
./stats.nix
2021-02-22 11:45:12 +01:00
];
c3d2.deployment.server = "server10";
2022-06-16 22:23:36 +02:00
networking.hostName = "public-access-proxy";
2022-06-20 20:17:13 +02:00
services.proxy = {
enable = true;
proxyHosts = [ {
2022-07-23 00:06:12 +02:00
hostNames = [ "auth.c3d2.de" ];
proxyTo.host = hostRegistry.auth.ip4;
} {
hostNames = [ "jabber.c3d2.de" ];
proxyTo = {
host = hostRegistry.jabber.ip4;
};
matchArg = "-m end";
} {
hostNames = [ "zw.poelzi.org" ];
proxyTo.host = "172.20.73.162";
matchArg = "-m end";
} {
hostNames = [ "borken.dvb.solutions" "borken.tlm.solutions" ];
proxyTo = {
host = hostRegistry.borken-data-hoarder.ip4;
};
matchArg = "-m end";
} {
hostNames = [ "staging.dvb.solutions" "staging.tlm.solutions" ];
proxyTo = {
host = hostRegistry.staging-data-hoarder.ip4;
};
matchArg = "-m end";
} {
hostNames = [ "dvb.solutions" "tlm.solutions" ];
proxyTo = {
host = "172.20.73.69";
};
matchArg = "-m end";
} {
hostNames = [ "blogs.c3d2.de" ];
proxyTo.host = hostRegistry.blogs.ip4;
} {
hostNames = [
"datenspuren.de" "www.datenspuren.de" "ds.c3d2.de" "datenspuren.c3d2.de"
"c3d2.de" "www.c3d2.de" "c3dd.de" "www.c3dd.de" "cccdd.de" "www.cccdd.de" "dresden.ccc.de" "www.dresden.ccc.de"
"openpgpkey.c3d2.de"
"netzbiotop.org" "www.netzbiotop.org"
"autotopia.c3d2.de"
];
proxyTo.host = zentralwerk.lib.config.site.net.flpk.hosts4.c3d2-web;
2022-06-21 23:41:56 +02:00
} {
hostNames = [
"codimd.c3d2.de"
2022-09-01 23:56:14 +02:00
"hackmd.c3d2.de"
"hedgedoc.c3d2.de"
];
proxyTo.host = hostRegistry.hedgedoc.ip4;
2022-07-16 20:38:23 +02:00
} {
hostNames = [ "ftp.c3d2.de" ];
proxyTo.host = hostRegistry.ftp.ip4;
} {
hostNames = [ "gitea.c3d2.de" ];
proxyTo.host = hostRegistry.gitea.ip4;
proxyProtocol = true;
} {
hostNames = [ "grafana.hq.c3d2.de" ];
proxyTo.host = hostRegistry.grafana.ip4;
} {
hostNames = [
"hydra.hq.c3d2.de"
2023-04-03 20:34:04 +02:00
"nix-cache.hq.c3d2.de"
];
proxyTo.host = hostRegistry.hydra.ip4;
2022-10-22 21:38:12 +02:00
} {
hostNames = [
"zentralwerk.org"
"www.zentralwerk.org"
];
proxyTo.host = hostRegistry.network-homepage.ip4;
} {
2023-12-16 16:43:23 +01:00
hostNames = [ "mate.c3d2.de" "matemat.c3d2.de" "matemat.hq.c3d2.de" ];
proxyTo.host = hostRegistry.matemat.ip4;
2023-03-24 01:56:23 +01:00
} {
hostNames = [
"element.c3d2.de"
"matrix.c3d2.de"
];
2023-03-24 01:56:23 +01:00
proxyTo.host = hostRegistry.matrix.ip4;
} {
hostNames = [ "mobilizon.c3d2.de" ];
proxyTo.host = hostRegistry.mobilizon.ip4;
} {
hostNames = [ "drkkr.hq.c3d2.de" ];
proxyTo.host = hostRegistry.pulsebert.ip4;
} {
hostNames = [ "scrape.hq.c3d2.de" ];
proxyTo.host = hostRegistry.scrape.ip4;
} {
hostNames = [
"adsb.hq.c3d2.de"
"sdr.hq.c3d2.de"
];
proxyTo.host = hostRegistry.sdrweb.ip4;
} {
hostNames = [
"stream.hq.c3d2.de" "torrents.hq.c3d2.de"
];
proxyTo.host = hostRegistry.stream.ip4;
} {
hostNames = [ "ticker.c3d2.de" ];
proxyTo.host = hostRegistry.ticker.ip4;
2022-06-23 18:46:35 +02:00
} {
hostNames = [ "wiki.c3d2.de" ];
proxyTo.host = hostRegistry.mediawiki.ip4;
2022-11-21 19:39:38 +01:00
} {
hostNames = [ "owncast.c3d2.de" ];
proxyTo.host = hostRegistry.owncast.ip4;
2022-11-30 18:13:08 +01:00
} {
hostNames = [ "c3d2.social" ];
proxyTo.host = hostRegistry.mastodon.ip4;
} {
hostNames = [ "relay.fedi.buzz" ];
proxyTo.host = zentralwerk.lib.config.site.net.serv.hosts4.buzzrelay;
2023-01-26 00:55:17 +01:00
} {
2023-12-16 16:42:34 +01:00
hostNames = [ "drone.c3d2.de" "drone.hq.c3d2.de" ];
2023-01-29 22:45:13 +01:00
proxyTo.host = hostRegistry.drone.ip4;
proxyProtocol = true;
} {
hostNames = [ "home-assistant.hq.c3d2.de" ];
proxyTo.host = hostRegistry.home-assistant.ip4;
} {
2024-01-11 01:17:07 +01:00
hostNames = [ "pretalx.c3d2.de" "talks.datenspuren.de" ];
proxyTo.host = hostRegistry.pretalx.ip4;
} {
hostNames = [ "vaultwarden.c3d2.de" ];
proxyTo.host = hostRegistry.vaultwarden.ip4;
} ];
};
networking.firewall.allowedTCPPorts = [
# haproxy
80 443
# gemini
1965
];
security.dhparams = {
enable = true;
params.haproxy = { };
};
# DNS records IN AAAA {www.,}c3d2.de point to this host but
# gemini:// is served on c3d2-web only
systemd.services.gemini-forward = {
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ socat ];
script = ''
socat tcp6-listen:1965,fork "tcp6:[${zentralwerk.lib.config.site.net.flpk.hosts6.flpk.c3d2-web}]:1965"
'';
serviceConfig = {
ProtectSystem = "strict";
DynamicUser = true;
};
};
system.stateVersion = "18.09";
}