nix-config/hosts/containers/public-access-proxy/configuration.nix

91 lines
2.1 KiB
Nix
Raw Normal View History

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
2021-02-22 11:45:12 +01:00
imports = [
../../../lib/lxc-container.nix
../../../lib/shared.nix
../../../lib/admins.nix
./proxy.nix
];
networking.hostName = "public-access-proxy";
networking.useNetworkd = true;
networking.interfaces.eth0 = {
2021-02-22 11:45:12 +01:00
ipv4.addresses = [{
address = "172.20.73.45";
prefixLength = 26;
}];
};
networking.defaultGateway = "172.20.73.1";
my.services.proxy = {
enable = true;
proxyHosts = [
{
hostNames = [ "cloud.bombenverleih.de" "unifi.arkom.men" ];
2021-02-22 11:45:12 +01:00
proxyTo = {
host = "172.22.99.192";
httpPort = 80;
httpsPort = 443;
};
2019-05-06 19:31:33 +02:00
}
{
hostNames = [ "grafana.hq.c3d2.de" ];
2021-02-22 11:45:12 +01:00
proxyTo = {
host = "grafana.serv.zentralwerk.dn42";
httpPort = 80;
httpsPort = 443;
};
}
{
hostNames = [ "kibana.hq.c3d2.de" "kibana-es.hq.c3d2.de" ];
2021-02-22 11:45:12 +01:00
proxyTo = {
host = "kibana.serv.zentralwerk.dn42";
httpPort = 80;
httpsPort = 443;
};
}
{
hostNames = [ "robo1.hq.c3d2.de" ];
2021-02-22 11:45:12 +01:00
proxyTo = {
host = "172.20.79.62";
httpPort = 80;
};
}
{
hostNames = [ "robots.datenspuren.de" ];
2021-02-22 11:45:12 +01:00
proxyTo = {
host = "172.22.99.170";
httpPort = 80;
httpsPort = 443;
};
}
{
hostNames = [ "error.hq.c3d2.de" ];
2021-02-22 11:45:12 +01:00
proxyTo = {
host = "172.20.73.47";
httpPort = 80;
httpsPort = 443;
};
}
2021-06-23 21:26:51 +02:00
{
hostNames = [ "nixvita.de" "www.nixvita.de" ];
proxyTo = {
host = "172.22.99.174";
httpPort = 80;
httpsPort = 443;
};
}
];
};
2021-02-22 11:45:12 +01:00
networking.firewall.allowedTCPPorts = [ 80 443 ];
system.stateVersion = "18.09"; # Did you read the comment?
}