Remove zerotier
This commit is contained in:
@@ -13,7 +13,6 @@ in
|
||||
./ping.nix
|
||||
./tailscale.nix
|
||||
./vpn.nix
|
||||
./zerotier.nix
|
||||
];
|
||||
|
||||
options.networking.ip_forward = mkEnableOption "Enable ip forwarding";
|
||||
|
||||
@@ -22,22 +22,10 @@ let
|
||||
ponyo = "cfamr6artx75qvt7ho3rrbsc7mkucmv5aawebwflsfuorusayacffryd.onion";
|
||||
s0 = "r3zvf7f2ppaeithzswigma46pajt3hqytmkg3rshgknbl3jbni455fqd.onion";
|
||||
};
|
||||
|
||||
zerotierHosts = {
|
||||
"s0.zt.neet.dev" = "172.30.145.180";
|
||||
"ponyo.zt.neet.dev" = "172.30.109.9";
|
||||
"ray.zt.neet.dev" = "172.30.189.212";
|
||||
};
|
||||
in {
|
||||
# some DNS providers filter local ip results from DNS request
|
||||
networking.hosts = concatMapAttrs (host: ip: {ip = [host];}) zerotierHosts;
|
||||
|
||||
# TODO only add if zerotier is enabled
|
||||
keepalive-ping.hosts = attrNames zerotierHosts;
|
||||
|
||||
programs.ssh.knownHosts = {
|
||||
ponyo = {
|
||||
hostNames = [ "ponyo" "ponyo.neet.dev" "ponyo.zt.neet.dev" "git.neet.dev" ];
|
||||
hostNames = [ "ponyo" "ponyo.neet.dev" "git.neet.dev" ];
|
||||
publicKey = system.ponyo;
|
||||
};
|
||||
ponyo-unlock = {
|
||||
@@ -53,11 +41,11 @@ in {
|
||||
publicKey = system.router-unlock;
|
||||
};
|
||||
ray = {
|
||||
hostNames = [ "ray" "ray.zt.neet.dev" ];
|
||||
hostNames = [ "ray" ];
|
||||
publicKey = system.ray;
|
||||
};
|
||||
s0 = {
|
||||
hostNames = [ "s0" "s0.zt.neet.dev" ];
|
||||
hostNames = [ "s0" ];
|
||||
publicKey = system.s0;
|
||||
};
|
||||
s0-unlock = {
|
||||
|
||||
@@ -10,7 +10,6 @@ with builtins;
|
||||
let
|
||||
cfg = config.keepalive-ping;
|
||||
|
||||
# keepalive-ping = {
|
||||
serviceTemplate = host:
|
||||
{
|
||||
"keepalive-ping@${host}" = {
|
||||
|
||||
@@ -8,7 +8,11 @@ in
|
||||
{
|
||||
options.services.tailscale.exitNode = mkEnableOption "Enable exit node support";
|
||||
|
||||
config.services.tailscale.enable = !config.boot.isContainer;
|
||||
config.services.tailscale.enable = mkDefault (!config.boot.isContainer);
|
||||
|
||||
# MagicDNS
|
||||
config.networking.nameservers = mkIf cfg.enable [ "1.1.1.1" "8.8.8.8" "100.100.100.100" ];
|
||||
config.networking.search = mkIf cfg.enable [ "koi-bebop.ts.net" ];
|
||||
|
||||
# exit node
|
||||
config.networking.firewall.checkReversePath = mkIf cfg.exitNode "loose";
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.zerotierone;
|
||||
in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
keepalive-ping.enable = true;
|
||||
|
||||
services.zerotierone.joinNetworks = [
|
||||
"565799d8f6d654c0"
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
9993
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user