infrastructure/machines/vault01/networking.nix
sinavir ce05bee635
All checks were successful
build configuration / build_rescue01 (push) Successful in 1m5s
build configuration / build_web02 (push) Successful in 1m6s
build configuration / build_storage01 (push) Successful in 1m9s
build configuration / build_vault01 (push) Successful in 1m8s
build configuration / build_compute01 (push) Successful in 1m16s
lint / check (push) Successful in 22s
build configuration / build_web01 (push) Successful in 1m30s
feat(vault01): CRI uplink is now connected to internet
2024-03-27 15:38:46 +01:00

53 lines
1 KiB
Nix

let
vlanName = "vlan-uplink-cri";
linkIp = "10.120.33.250";
linkPrefix = "30";
upstreamRouterIp = "10.120.33.249";
publicIp = "129.199.195.129"; # sync with meta
linkPrefixedIp = "${linkIp}/${linkPrefix}";
in
{
systemd.network = {
networks = {
"10-enp67s0f0np0" = {
name = "enp67s0f0np0";
networkConfig = {
VLAN = [ vlanName ];
LinkLocalAddressing = false;
LLDP = false;
EmitLLDP = false;
IPv6AcceptRA = false;
IPv6SendRA = false;
};
};
"10-${vlanName}" = {
name = vlanName;
address = [ linkPrefixedIp ];
routes = [
{
routeConfig = {
PreferredSource = publicIp;
Gateway = upstreamRouterIp;
};
}
];
};
};
netdevs = {
"10-vlan-uplink-cri" = {
netdevConfig = {
Name = vlanName;
Kind = "vlan";
};
vlanConfig = {
Id = 223;
};
};
};
};
}