This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 2configs / zerotier.nix
873 B 33 lines
1{ lib, ... }: 2let 3 hosts = lib.mapAttrs (machine: _: { 4 ip = 5 if builtins.pathExists ../machines/${machine}/facts/zerotier-ip then 6 builtins.readFile ../machines/${machine}/facts/zerotier-ip 7 else 8 null; 9 }) (builtins.readDir ../machines); 10 11 filteredHosts = lib.filterAttrs (_name: host: host.ip != null) hosts; 12in 13{ 14 services.zerotierone.joinNetworks = [ "7c31a21e86f9a75c" ]; 15 services.zerotierone.localConf.settings = { 16 interfacePrefixBlacklist = [ 17 "ygg" 18 "mesh" 19 "retiolum" 20 "wiregrill" 21 ]; 22 physical = { 23 "10.243.0.0/16".blacklist = true; 24 "10.244.0.0/16".blacklist = true; 25 "42::/16".blacklist = true; 26 "5d9::/7".blacklist = true; 27 }; 28 }; 29 30 networking.extraHosts = lib.concatMapStringsSep "\n" (host: "${host.value.ip} ${host.name}.z") ( 31 lib.attrsToList filteredHosts 32 ); 33}