infrastructure/machines/public-cof/networking.nix

38 lines
672 B
Nix

{ lib, ... }:
{
networking = {
hostName = "public-cof";
useNetworkd = true;
firewall = { enable = true; allowedTCPPorts = [ 22 ]; };
};
systemd.network.networks = {
"10-ens18" = {
name = "ens18";
address = [ "2001:470:1f13:187:c08e:feff:fe4d:f5f5/64" ];
DHCP = "ipv4";
dhcpV4Config.RouteMetric = 10;
};
"10-ens19" = {
name = "ens19";
address = [ "10.1.1.21/22" ];
DHCP = "ipv4";
};
"10-ens20" = {
name = "ens20";
address = [ "45.13.104.27/32" "45.13.104.29/32" ];
DHCP = "ipv4";
};
};
services.nginx.defaultListenAddresses = [ "[::0]" "45.13.104.27" ];
}