From 921b59fa409d45f32c4b4445add044d89e9b36f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= <dev@felschr.com>
Date: Wed, 29 Jan 2025 20:38:10 +0100
Subject: [PATCH] fix(inadyn): filter IPv6 via Global Unicast Address Prefix

---
 hosts/home-server.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hosts/home-server.nix b/hosts/home-server.nix
index 760e49c..db971ed 100644
--- a/hosts/home-server.nix
+++ b/hosts/home-server.nix
@@ -81,8 +81,8 @@ in
   ''}";
   services.inadyn.ipv6.enable = true;
   services.inadyn.ipv6.command = "${pkgs.writeScript "get-ipv6" ''
-    ${pkgs.tailscale}/bin/tailscale status --json \
-      | ${pkgs.jq}/bin/jq -r '.Self.Addrs' \
+    ${pkgs.iproute2}/bin/ip -6 addr show scope global \
+      | ${pkgs.grepcidr}/bin/grepcidr '2000::/3' \
       | grep -o '[0-9a-f:]*::102'
   ''}";
   services.inadyn.domains = [