router: instruct dnsmasq to ignore /etc/hosts
1 file changed, 8 insertions(+), 8 deletions(-)
changed files
M system/roles/router.nix → system/roles/router.nix
@@ -60,17 +60,12 @@ ]; networking = { useDHCP = false; - hosts = { - "${modem.deviceAddr}" = [ - "${modem.hostname}.${domain} ${modem.hostname}" - ]; - } - // (lib.genAttrs myAddresses ( + hosts = lib.genAttrs myAddresses ( lib.const [ "${fqdn}" "${hostName}" ] - )); + ); nameservers = lib.mkForce [ "::1" ]; nat = {@@ -331,6 +326,8 @@ "${ulaPrefix}:42::10,${ulaPrefix}:42::ffff,64,48h" # "set:ra6,::,constructor:${lan},ra-stateless" ]; + no-hosts = true; # here be dragons (127.0.0.2) + # configure static allocations in /etc/ethers # format: # [hwaddr] [name|ipv4 address]@@ -369,12 +366,15 @@ quiet-ra = true; expand-hosts = true; - localise-queries = true; + host-record = [ + "${modem.hostname},${modem.deviceAddr},${toString (60 * 60)}" + ]; local = [ "/${domain}/" ]; local-ttl = 1; # defaults to 0 (client should not cache), but 1s shouldn't hurt interface-name = [ + "${fqdn},${lan}" "wan.${domain},${wan}/6" ]; };