task | add new host w2

This commit is contained in:
Don Harper 2024-10-10 07:41:44 -05:00
parent d151bdfa18
commit 86d2bc58cf
7 changed files with 327 additions and 0 deletions

33
hosts/w2/network.nix Normal file
View file

@ -0,0 +1,33 @@
{ lib, ... }: {
# This file was populated at runtime with the networking
# details gathered from the active system.
networking = {
nameservers = [ "1.1.1.1"
];
defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
interfaces = {
eth0 = {
ipv4.addresses = [
{ address="178.156.139.49"; prefixLength=32; }
];
ipv6.addresses = [
{ address="2a01:4ff:f0:9df8::1"; prefixLength=64; }
{ address="fe80::9400:3ff:fec3:dc26"; 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:03:c3:dc:26", NAME="eth0"
'';
}