From c44b8410910c27fa6603bdc77465cc6df8a70899 Mon Sep 17 00:00:00 2001 From: Chris Montgomery Date: Mon, 8 Jul 2024 22:06:32 -0400 Subject: [PATCH] fix(os::net:tailscale): enable conditionally to prevent lockouts --- machines/boschic/default.nix | 2 ++ machines/chert/networking.nix | 2 ++ machines/gabbro/networking.nix | 2 ++ machines/hierophant/networking.nix | 1 + machines/hodgepodge/default.nix | 2 ++ machines/ryosuke/default.nix | 2 ++ nixos/profiles/networking/tailscale.nix | 10 ++-------- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/machines/boschic/default.nix b/machines/boschic/default.nix index f6a0fad8c..a01231e95 100644 --- a/machines/boschic/default.nix +++ b/machines/boschic/default.nix @@ -28,6 +28,8 @@ in ### === networking =========================================================== + services.tailscale.enable = true; + # FIXME: no connection on boot -- i need to disable internet and re-enable # every time despite indication of a wired connection in GNOME status bar networking = diff --git a/machines/chert/networking.nix b/machines/chert/networking.nix index 9a5fdb143..ebd740708 100644 --- a/machines/chert/networking.nix +++ b/machines/chert/networking.nix @@ -3,5 +3,7 @@ let inherit (config.networking) hostName; in { + services.tailscale.enable = true; + networking.domain = ops.hosts.${hostName}.domain; } diff --git a/machines/gabbro/networking.nix b/machines/gabbro/networking.nix index 9a5fdb143..ebd740708 100644 --- a/machines/gabbro/networking.nix +++ b/machines/gabbro/networking.nix @@ -3,5 +3,7 @@ let inherit (config.networking) hostName; in { + services.tailscale.enable = true; + networking.domain = ops.hosts.${hostName}.domain; } diff --git a/machines/hierophant/networking.nix b/machines/hierophant/networking.nix index 1b006a28f..c8102b9db 100644 --- a/machines/hierophant/networking.nix +++ b/machines/hierophant/networking.nix @@ -7,5 +7,6 @@ in networking.nameservers = dns.nameservers.cloudflare; # Allow this host to function as a Tailscale exit node. + services.tailscale.enable = true; services.tailscale.useRoutingFeatures = "both"; } diff --git a/machines/hodgepodge/default.nix b/machines/hodgepodge/default.nix index ccc1b7ab6..9cfeaeb58 100644 --- a/machines/hodgepodge/default.nix +++ b/machines/hodgepodge/default.nix @@ -28,6 +28,8 @@ }; }; + services.tailscale.enable = true; + networking.usePredictableInterfaceNames = false; networking.firewall.enable = true; diff --git a/machines/ryosuke/default.nix b/machines/ryosuke/default.nix index 2a447d653..ba5eb7532 100644 --- a/machines/ryosuke/default.nix +++ b/machines/ryosuke/default.nix @@ -26,5 +26,7 @@ time.timeZone = "America/New_York"; networking.firewall.enable = true; + services.tailscale.enable = true; + system.stateVersion = "22.05"; } diff --git a/nixos/profiles/networking/tailscale.nix b/nixos/profiles/networking/tailscale.nix index c8af1d5a7..35f3962b0 100644 --- a/nixos/profiles/networking/tailscale.nix +++ b/nixos/profiles/networking/tailscale.nix @@ -1,11 +1,5 @@ -{ - lib, - config, - # pkgs, - ... -}: -{ - services.tailscale.enable = true; +{ lib, config, ... }: +lib.mkIf config.services.tailscale.enable { services.tailscale.interfaceName = "ts0"; services.tailscale.useRoutingFeatures = "client";