Hi, I’m setting up NAT rules so my nixos-container
can access the public internet, and the following works mostly:
nat = {
enable = true;
internalInterfaces = [
"ve-+" # nixos-containers
];
externalInterface = "wlp3s0";
};
However, if I connect my laptop to the internet via a cable, the externalInterface
name should be “enp2s0” instead. How do I configure this? It is not an acceptable solution to have to change the config and rebuild every time I plug the laptop in or unplug it again!
kind regards