Merge pull request #25495 from michalpalka/xen-forward-dns

xen service: Forward DNS queries from Xen guests

Changed files
+15 -3
nixos
modules
virtualisation
+15 -3
nixos/modules/virtualisation/xen-dom0.nix
···
subnet.
'';
};
};
virtualisation.xen.stored =
···
interface=${cfg.bridge.name}
except-interface=lo
bind-interfaces
-
auth-server=dns.xen.local,${cfg.bridge.name}
auth-zone=xen.local,$XEN_BRIDGE_NETWORK_ADDRESS/${toString cfg.bridge.prefixLength}
domain=xen.local
addn-hosts=/var/run/xen/dnsmasq.hostsfile
···
strict-order
no-hosts
bogus-priv
-
no-resolv
-
no-poll
filterwin2k
clear-on-reload
domain-needed
···
subnet.
'';
};
+
+
forwardDns = mkOption {
+
default = false;
+
description = ''
+
If set to <literal>true</literal>, the DNS queries from the
+
hosts connected to the bridge will be forwarded to the DNS
+
servers specified in /etc/resolv.conf .
+
'';
+
};
+
};
virtualisation.xen.stored =
···
interface=${cfg.bridge.name}
except-interface=lo
bind-interfaces
auth-zone=xen.local,$XEN_BRIDGE_NETWORK_ADDRESS/${toString cfg.bridge.prefixLength}
domain=xen.local
addn-hosts=/var/run/xen/dnsmasq.hostsfile
···
strict-order
no-hosts
bogus-priv
+
${optionalString (!cfg.bridge.forwardDns) ''
+
no-resolv
+
no-poll
+
auth-server=dns.xen.local,${cfg.bridge.name}
+
''}
filterwin2k
clear-on-reload
domain-needed