feat(unbound): adding dynamic host IP function
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user