nixos: services: wireguard: remove internal DNS
For some reason `unbound` stopped working reliably recently. I can't be bothered to debug DNS issues, so let's remove it, it's only marginally useful anyways.
This commit is contained in:
parent
eaf542722a
commit
adf2ef6f4e
1 changed files with 1 additions and 17 deletions
|
|
@ -81,19 +81,7 @@ let
|
|||
lib.mapAttrsToList mkPeer otherPeers;
|
||||
|
||||
# Set up clients to use configured DNS servers
|
||||
dns =
|
||||
let
|
||||
toInternalIps = peer: [
|
||||
"${cfg.net.v4.subnet}.${toString peer.clientNum}"
|
||||
"${cfg.net.v6.subnet}::${toString peer.clientNum}"
|
||||
];
|
||||
# We know that `otherPeers` is an attribute set of servers
|
||||
internalIps = lib.flatten
|
||||
(lib.mapAttrsToList (_: peer: toInternalIps peer) otherPeers);
|
||||
internalServers = lib.optionals cfg.dns.useInternal internalIps;
|
||||
in
|
||||
lib.mkIf (!thisPeerIsServer)
|
||||
(internalServers ++ cfg.dns.additionalServers);
|
||||
dns = cfg.dns.additionalServers;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -122,10 +110,6 @@ in
|
|||
};
|
||||
|
||||
dns = {
|
||||
useInternal = my.mkDisableOption ''
|
||||
Use internal DNS servers from wireguard 'server'
|
||||
'';
|
||||
|
||||
additionalServers = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue