about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-04-14T07·15+0300
committertazjin <tazjin@tvl.su>2023-04-17T09·32+0000
commit43d5658dad8b94ce63f5b6c400c248ce9eeec707 (patch)
tree96e17484dd7483b0717f4900e76add72efcd81f3
parenteadcfbbfab12edd7b956a31a88330dbc0ba0b038 (diff)
refactor(tazjin/nixos): zerotier out, tailscale in (again) r/6097
Tailscale just works better out of the box than Zerotier, and its
clients aren't unfree.

Change-Id: Ie35ef1adde0edbe923992b02e6b636269a96a81e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8482
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
-rw-r--r--users/tazjin/nixos/modules/zerotier.nix14
-rw-r--r--users/tazjin/nixos/polyanka/default.nix9
-rw-r--r--users/tazjin/nixos/tverskoy/default.nix2
-rw-r--r--users/tazjin/nixos/zamalek/default.nix1
4 files changed, 7 insertions, 19 deletions
diff --git a/users/tazjin/nixos/modules/zerotier.nix b/users/tazjin/nixos/modules/zerotier.nix
deleted file mode 100644
index bd503cf8f026..000000000000
--- a/users/tazjin/nixos/modules/zerotier.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-# Configuration for my Zerotier network.
-
-{
-  environment.persistence."/persist".directories = [
-    "/var/lib/zerotier-one"
-  ];
-
-  services.zerotierone.enable = true;
-  services.zerotierone.joinNetworks = [
-    "35c192ce9bd4c8c7"
-  ];
-
-  networking.firewall.trustedInterfaces = [ "zt7nnembs4" ];
-}
diff --git a/users/tazjin/nixos/polyanka/default.nix b/users/tazjin/nixos/polyanka/default.nix
index eed36d656a34..c7f41b95aa0c 100644
--- a/users/tazjin/nixos/polyanka/default.nix
+++ b/users/tazjin/nixos/polyanka/default.nix
@@ -125,10 +125,11 @@ in
   programs.mosh.enable = true;
   services.openssh.enable = true;
 
-  services.zerotierone.enable = true;
-  services.zerotierone.joinNetworks = [
-    "35c192ce9bd4c8c7"
-  ];
+  services.tailscale.enable = true;
+  boot.kernel.sysctl = {
+    "net.ipv4.ip_forward" = 1;
+    "net.ipv6.conf.all.forwarding" = 1;
+  };
 
   system.stateVersion = "20.09";
 }
diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix
index 36a037aec1dc..513f65966fce 100644
--- a/users/tazjin/nixos/tverskoy/default.nix
+++ b/users/tazjin/nixos/tverskoy/default.nix
@@ -22,7 +22,6 @@ lib.fix (self: {
     (usermod "laptop.nix")
     (usermod "persistence.nix")
     (usermod "physical.nix")
-    (usermod "zerotier.nix")
 
     (pkgs.home-manager.src + "/nixos")
   ] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix;
@@ -122,6 +121,7 @@ lib.fix (self: {
   security.rtkit.enable = true;
 
   services = {
+    tailscale.enable = true;
     printing.enable = true;
 
     # expose i2c device as /dev/i2c-amdgpu-dm and make it user-accessible
diff --git a/users/tazjin/nixos/zamalek/default.nix b/users/tazjin/nixos/zamalek/default.nix
index 97bafc65a800..a340e8a3e897 100644
--- a/users/tazjin/nixos/zamalek/default.nix
+++ b/users/tazjin/nixos/zamalek/default.nix
@@ -81,6 +81,7 @@ in
   services.xserver.libinput.touchpad.clickMethod = "clickfinger";
   services.xserver.libinput.touchpad.tapping = false;
   services.avahi.enable = true;
+  services.tailscale.enable = true;
   powerManagement.powertop.enable = true;
 
   system.stateVersion = "21.11";