From 461f651e261a798a1b29179e86fec8bf3a69ab95 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 10 Jun 2024 17:20:41 +0200 Subject: [PATCH] fix: dont use types.cidr* on host cidr because it zeroes the last part --- hosts/ward/net.nix | 2 +- modules/globals.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hosts/ward/net.nix b/hosts/ward/net.nix index 1d9d4f8..f40333c 100644 --- a/hosts/ward/net.nix +++ b/hosts/ward/net.nix @@ -110,7 +110,7 @@ # Provide a DNS resolver ipv6SendRAConfig = { EmitDNS = true; - DNS = globals.net.home-lan.hosts.ward-adguardhome.ipv4; + DNS = globals.net.home-lan.hosts.ward-adguardhome.ipv6; }; linkConfig.RequiredForOnline = "routable"; }; diff --git a/modules/globals.nix b/modules/globals.nix index 21e6f50..325491e 100644 --- a/modules/globals.nix +++ b/modules/globals.nix @@ -38,7 +38,7 @@ in { }; ipv4 = mkOption { - type = types.net.ipv4; + type = types.nullOr types.net.ipv4; description = "The IPv4 of this host"; readOnly = true; default = @@ -48,7 +48,7 @@ in { }; ipv6 = mkOption { - type = types.net.ipv6; + type = types.nullOr types.net.ipv6; description = "The IPv6 of this host"; readOnly = true; default = @@ -58,7 +58,7 @@ in { }; cidrv4 = mkOption { - type = types.net.cidrv4; + type = types.nullOr types.str; # FIXME: this is not types.net.cidr because it would zero out the host part description = "The IPv4 of this host including CIDR mask"; readOnly = true; default = @@ -68,7 +68,7 @@ in { }; cidrv6 = mkOption { - type = types.net.cidrv6; + type = types.nullOr types.str; # FIXME: this is not types.net.cidr because it would zero out the host part description = "The IPv6 of this host including CIDR mask"; readOnly = true; default =