How to change dns servers

Hi all, this is my first post here, I installed nixos on my home computer last week.
I have this issue with dns:
I have a nas at home to manage dns servers and I want no other than those I choose.
Modifying /etc/resolv.conf is easy but on reboot this file is rewritten with the defaults. I have also written this in my config file
networking.nameservers = [ “” ];
but this doesn’t help getting rid of other servers.
Is there a clean way to solve this ? (of course I could rewrite resolv.conf at each new session but it doesn’t seem very correct :slight_smile:


Configure your router to send the right dns servers with its dhcp responses?

Yes thanks, I/ll try this soon ( right now the provider’s site is down).