diff --git a/nixos/modules/system/boot/initrd-network.nix b/nixos/modules/system/boot/initrd-network.nix index 1019b8db6da..720a9ffd53d 100644 --- a/nixos/modules/system/boot/initrd-network.nix +++ b/nixos/modules/system/boot/initrd-network.nix @@ -12,10 +12,9 @@ let '' #! /bin/sh if [ "$1" = bound ]; then + ip address add "$ip/$mask" dev "$interface" if [ -n "$mtu" ]; then - ip address add "$ip/$mask" dev "$interface" mtu "$mtu" - else - ip address add "$ip/$mask" dev "$interface" + ip link set mtu "$mtu" dev "$interface" fi if [ -n "$staticroutes" ]; then echo "$staticroutes" \