feat(unbound): adding dynamic host IP function

This commit is contained in:
2025-09-07 16:41:10 +02:00
parent a7dd9f7aa1
commit b882f644fc

View File

@@ -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;