generated from Luis/nextjs-python-web-template
clanModules: add zerotier
This commit is contained in:
29
clanModules/zerotier.nix
Normal file
29
clanModules/zerotier.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
options.clan.networking.zerotier = {
|
||||||
|
networkId = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = ''
|
||||||
|
zerotier networking id
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
systemd.network.networks.zerotier = {
|
||||||
|
matchConfig.Name = "zt*";
|
||||||
|
networkConfig = {
|
||||||
|
LLMNR = true;
|
||||||
|
LLDP = true;
|
||||||
|
MulticastDNS = true;
|
||||||
|
KeepConfiguration = "static";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.firewall.allowedUDPPorts = [ 9993 ];
|
||||||
|
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 5353 ];
|
||||||
|
networking.firewall.interfaces."zt+".allowedUDPPorts = [ 5353 ];
|
||||||
|
services.zerotierone = {
|
||||||
|
enable = true;
|
||||||
|
joinNetworks = [ config.clan.networking.zerotier.networkId ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,4 +7,5 @@
|
|||||||
writers = ./writers;
|
writers = ./writers;
|
||||||
};
|
};
|
||||||
flake.nixosModules = lib.mapAttrs (_: nix: { imports = [ nix ]; }) (self.lib.findNixFiles ../nixosModules);
|
flake.nixosModules = lib.mapAttrs (_: nix: { imports = [ nix ]; }) (self.lib.findNixFiles ../nixosModules);
|
||||||
|
flake.clanModules = lib.mapAttrs (_: nix: { imports = [ nix ]; }) (self.lib.findNixFiles ../clanModules);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user