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;
|
lib.mapAttrsToList mkPeer otherPeers;
|
||||||
|
|
||||||
# Set up clients to use configured DNS servers
|
# Set up clients to use configured DNS servers
|
||||||
dns =
|
dns = cfg.dns.additionalServers;
|
||||||
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);
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -122,10 +110,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
dns = {
|
dns = {
|
||||||
useInternal = my.mkDisableOption ''
|
|
||||||
Use internal DNS servers from wireguard 'server'
|
|
||||||
'';
|
|
||||||
|
|
||||||
additionalServers = mkOption {
|
additionalServers = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [
|
default = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue