From af3305a51e9c98ec3f986580b90a0f6df2785c9d Mon Sep 17 00:00:00 2001 From: Fabian Hauser Date: Sun, 8 Mar 2020 15:32:36 +0000 Subject: [PATCH] Add hostname to router namespace --- role/networking/dns-recursive.nix | 4 +++- role/router.nix | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/role/networking/dns-recursive.nix b/role/networking/dns-recursive.nix index d102c82..7f10805 100644 --- a/role/networking/dns-recursive.nix +++ b/role/networking/dns-recursive.nix @@ -6,6 +6,7 @@ prefixLength, domain, dhcpRange, + routerHostName, }: let pkgs = import{}; @@ -98,6 +99,7 @@ in # The example below send any host in double-click.net to a local # web-server. #address=/double-click.net/127.0.0.1 + address=/${routerHostName}.${domain}/${routerAddress} # --address (and --server) work with IPv6 addresses too. #address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 @@ -143,7 +145,7 @@ in # If you don't want dnsmasq to read /etc/hosts, uncomment the # following line. - #no-hosts + no-hosts # or if you want it to read another file, as well as /etc/hosts, use # this. #addn-hosts=/etc/banner_add_hosts diff --git a/role/router.nix b/role/router.nix index 5ce83f9..b8b76a3 100644 --- a/role/router.nix +++ b/role/router.nix @@ -16,7 +16,8 @@ prefixLength = 24; domain = "ilanz.fh2.ch"; dhcpRange = "10.1.1.2,10.1.1.249"; - } + routerHostName = "router"; + }, }: let pkgs = import{};