stubby: make resolv.conf immutable
This commit is contained in:
parent
eab95c0265
commit
857537342a
@ -1,4 +1,4 @@
|
|||||||
{ ... }: {
|
{ pkgs, ... }: {
|
||||||
services.stubby = {
|
services.stubby = {
|
||||||
enable = true;
|
enable = true;
|
||||||
upstreamServers = ''
|
upstreamServers = ''
|
||||||
@ -21,6 +21,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.activationScripts.immutableDns = {
|
||||||
|
text = ''
|
||||||
|
${pkgs.e2fsprogs}/bin/chattr +i /etc/resolv.conf
|
||||||
|
'';
|
||||||
|
deps = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager.dns = "none";
|
networkmanager.dns = "none";
|
||||||
resolvconf.dnsExtensionMechanism = false;
|
resolvconf.dnsExtensionMechanism = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user