diff --git a/modules/server/unbound/default.nix b/modules/server/unbound/default.nix index a174ba6c..9e4b516d 100644 --- a/modules/server/unbound/default.nix +++ b/modules/server/unbound/default.nix @@ -7,6 +7,15 @@ let unit = "unbound"; cfg = config.server.${unit}; + + hostIp = + hostname: + if hostname == "ziggy" then + "192.168.88.12" + else if hostname == "sobotka" then + "192.168.88.14" + else + throw "No IP defined for host ${hostname}"; in { options.server.${unit} = { @@ -52,7 +61,7 @@ in infra-cache-slabs = 8; interface = [ "127.0.0.1@5335" - "192.168.88.14@5335" + "${hostIp config.networking.hostName}@5335" "::@5335" ]; key-cache-slabs = 8;