From 34bb2fd13faac0b7588f62af6c166e7442def248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 11 Jul 2023 16:30:35 +0200 Subject: [PATCH] enable mdns for zerotier --- modules/zerotier/default.nix | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/modules/zerotier/default.nix b/modules/zerotier/default.nix index df99677..3997cdc 100644 --- a/modules/zerotier/default.nix +++ b/modules/zerotier/default.nix @@ -1,7 +1,27 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: { - networking.firewall.allowedTCPPorts = [ 9993 ]; - networking.firewall.allowedUDPPorts = [ 9993 ]; + networking.firewall.allowedTCPPorts = [ + 9993 + # FIXME: figure out why it's not enough to just allow it on interface zt* + 5353 + ]; + networking.firewall.allowedUDPPorts = [ + 9993 + 5353 + ]; + systemd.network.networks = { + zerotier.extraConfig = '' + [Match] + Name=zt* + + [Network] + LLMNR=true + LLDP=true + MulticastDNS=true + KeepConfiguration=static + ''; + }; + services.zerotierone = { enable = true; joinNetworks = [