snowflake/hosts/sora/networking.nix

53 lines
1.1 KiB
Nix
Raw Normal View History

2023-06-23 09:25:35 -04:00
{lib, ...}: {
2023-06-23 10:00:03 -04:00
environment.etc = {
"resolv.conf".text = "nameserver 8.8.8.8\n";
};
2023-06-23 09:25:35 -04:00
networking = {
nameservers = [
"8.8.8.8"
];
defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
interfaces = {
eth0 = {
ipv4.addresses = [
{
address = "5.161.181.184";
prefixLength = 32;
}
];
ipv6.addresses = [
{
address = "2a01:4ff:f0:337a::1";
prefixLength = 64;
}
{
address = "fe80::9400:2ff:fe4e:83c1";
prefixLength = 64;
}
];
ipv4.routes = [
{
address = "172.31.1.1";
prefixLength = 32;
}
];
ipv6.routes = [
{
address = "fe80::1";
prefixLength = 128;
}
];
};
};
};
services.udev.extraRules = ''
ATTR{address}=="96:00:02:4e:83:c1", NAME="eth0"
'';
}