clan-infra/modules/zerotier/default.nix

35 lines
642 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
# 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
'';
};
2023-07-05 14:49:02 +00:00
services.zerotierone = {
enable = true;
joinNetworks = [
"33d87fa6bd93423e"
];
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"zerotierone"
];
}