I've not found much information in the manual.
I've tried to manually modify the file /etc/resolv.conf
however this seems to be overwritten by something?
How can I achieve this?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communitynetworking.nameservers = [ "1.1.1.1" "9.9.9.9" ]
/etc/nixos/configuration.nix
(unless you use flakes), so you should add it there. See nixos.org/manual/nixos/stable/index.html#sec-changing-config and nixos.org/manual/nixos/stable/index.html#ch-configuration for more info.
environment.etc = {
"resolv.conf".text = "nameserver 192.168.0.32\n";
};
Adding the above to my /etc/nixos/configuration.nix
seems to work.