From c1c67ecc80377861eac59ee9c41438add88b4143 Mon Sep 17 00:00:00 2001 From: niten Date: Wed, 31 Jan 2024 09:26:55 -0800 Subject: [PATCH] ip -> network, one breaking --- lib/fudo/zones.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/fudo/zones.nix b/lib/fudo/zones.nix index fc16e0f..ebf3836 100644 --- a/lib/fudo/zones.nix +++ b/lib/fudo/zones.nix @@ -13,11 +13,12 @@ in { config = let domainName = config.instance.local-domain; zoneName = config.fudo.domains."${domainName}".zone; - isLocal = ip: ip == "::1" || hasPrefix "127." ip; + isLocal = network: network == "::1" || hasPrefix "127." network; # FIXME: ipv6? - localNetworks = filter (ip: !(isLocal ip)) config.instance.local-networks; + localNetworks = + filter (network: !(isLocal network)) config.instance.local-networks; makeName = network: - if !isNull (builtins.match ":" ip) then + if !isNull (builtins.match ":" network) then "ip6:${network}" else "ip4:${network}";