config/c3d2: add static resolv.conf only if systemd-resolved is disabled
This commit is contained in:
parent
09d88ff8b4
commit
ab9d2680c4
|
@ -138,15 +138,17 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
networking.useHostResolvConf = false;
|
||||
networking.nameservers = with hostRegistry.hosts.dnscache; [
|
||||
ip4
|
||||
ip6
|
||||
"9.9.9.9"
|
||||
];
|
||||
environment.etc."resolv.conf".text = lib.concatMapStrings (ns: ''
|
||||
nameserver ${ns}
|
||||
'') config.networking.nameservers;
|
||||
networking.useHostResolvConf = lib.mkIf (!config.services.resolved.enable) true;
|
||||
environment.etc."resolv.conf" = lib.mkIf (!config.services.resolved.enable) {
|
||||
text = lib.concatMapStrings (ns: ''
|
||||
nameserver ${ns}
|
||||
'') config.networking.nameservers;
|
||||
};
|
||||
|
||||
nix = {
|
||||
autoOptimiseStore = true;
|
||||
|
|
Loading…
Reference in New Issue