nixos-images
nixos-images copied to clipboard
When NixOS boots, the default gateway route is missing
My VPS provider's default gateway is on a different subnet and is resolved locally (onlink). I don't know much about computer networks and spent a day trying to solve the problem and today I tried to add this route:
ip route add default via 10.0.0.1 dev ens3 onlink
After that the VPS was able to accept connections. It seems like your script should save all network settings, but in this case the route is not saved and after kexec the server is no longer available on the Internet.