clan-infra/modules/zerotier/default.nix

29 lines
742 B
Nix
Raw Normal View History

2023-07-11 14:30:35 +00:00
{ lib, ... }:
2023-07-05 14:49:02 +00:00
{
2023-07-11 14:30:35 +00:00
networking.firewall.allowedTCPPorts = [ 9993 ];
networking.firewall.allowedUDPPorts = [ 9993 ];
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 5353 ];
networking.firewall.interfaces."zt+".allowedUDPPorts = [ 5353 ];
# Note avahi was super slow. systemd-resolved worked much faster for mdns
systemd.network.networks.zerotier = {
matchConfig.Name = "zt*";
networkConfig = {
LLMNR = true;
LLDP = true;
MulticastDNS = true;
KeepConfiguration = "static";
};
2023-07-11 14:30:35 +00:00
};
2023-07-05 14:49:02 +00:00
services.zerotierone = {
enable = true;
joinNetworks = [
"33d87fa6bd93423e"
];
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"zerotierone"
];
}