stubby: make resolv.conf immutable

This commit is contained in:
Timothy DeHerrera 2020-07-16 15:16:52 -06:00
parent eab95c0265
commit 857537342a
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
1 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,4 @@
{ ... }: {
{ pkgs, ... }: {
services.stubby = {
enable = true;
upstreamServers = ''
@ -21,6 +21,13 @@
};
};
system.activationScripts.immutableDns = {
text = ''
${pkgs.e2fsprogs}/bin/chattr +i /etc/resolv.conf
'';
deps = [ ];
};
networking = {
networkmanager.dns = "none";
resolvconf.dnsExtensionMechanism = false;