about summary refs log tree commit diff
path: root/modules/unbound.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/unbound.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/unbound.nix b/modules/unbound.nix
index e71d48c..d10096d 100644
--- a/modules/unbound.nix
+++ b/modules/unbound.nix
@@ -1,5 +1,6 @@
 {
   config,
+  inputs,
   lib,
   pkgs,
   this,
@@ -221,5 +222,15 @@ in
       };
 
       boot.kernel.sysctl."net.ipv4.tcp_fastopen" = mkOverride 200 3;
+
+      topology = with cfg; {
+        nodes.${this.hostname}.services.unbound = {
+          name = "Unbound";
+          icon = "${inputs.homelab-svg-assets}/assets/unbound.svg";
+          details.listen.text = concatMapStringsSep "\n" (i: "${i}:53") (
+            filter (i: i != "127.0.0.1" && i != "::1") config.services.unbound.settings.server.interface
+          );
+        };
+      };
     };
 }

Consider giving Nix/NixOS a try! <3