diff --git a/nix/os/devices/CFB4ED74/system.nix b/nix/os/devices/CFB4ED74/system.nix index b2ff413..5fb7add 100644 --- a/nix/os/devices/CFB4ED74/system.nix +++ b/nix/os/devices/CFB4ED74/system.nix @@ -15,12 +15,17 @@ in { # iperf3 5201 ]; + + networking.useDHCP = true; + networking.usePredictableInterfaceNames = false; networking.interfaces.eth0 = { - useDHCP = true; - ipv6.addresses = [ { - address = "2a02:c207:3003:2387::1"; - prefixLength = 64; - } ]; + ipv6.addresses = [ + { address = "2a02:c207:3003:2387::1"; prefixLength = 64; } + ]; + }; + networking.defaultGateway6 = { + address = "fe80::1"; + interface = "eth0"; }; # Kubernetes @@ -43,4 +48,12 @@ in { authorizedKeys = keys.users.steveej.openssh; }; }; + + boot.initrd.postMountCommands = '' + for iface in $(cd /sys/class/net && ls); do + echo "Bringing down $iface..." + ip address flush dev $iface + ip link set $iface down + done + ''; } diff --git a/nix/os/devices/default.nix b/nix/os/devices/disk.nix similarity index 100% rename from nix/os/devices/default.nix rename to nix/os/devices/disk.nix