From f31ac25f3d12c36b458779b4ee06a8b02fa1acac Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Fri, 13 Nov 2026 19:42:38 +0100 Subject: [PATCH] backwards: Replace `tailscale-qs` with the official tailscale systray The `tailscale-qs` extension's node list could not be opened. The official `tailscale systray` shows the nodes and exit nodes, with the AppIndicator extension providing a tray in GNOME. The systray never retries if no tray exists when it starts, so it waits for one first. --- hosts/backwards/modules/tailscale/default.nix | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/hosts/backwards/modules/tailscale/default.nix b/hosts/backwards/modules/tailscale/default.nix index e722b6d..083d18b 100644 --- a/hosts/backwards/modules/tailscale/default.nix +++ b/hosts/backwards/modules/tailscale/default.nix @@ -1,9 +1,14 @@ -{ pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { services.tailscale = { enable = true; - # Required for the GNOME extension to control tailscale without root + # Required for the systray to control tailscale without root extraSetFlags = [ "--operator=alex" ]; }; @@ -13,12 +18,31 @@ }; home-manager.users.alex = { + # The official tailscale systray, including the node list and exit nodes + services.tailscale-systray = { + enable = true; + package = config.services.tailscale.package; + }; + + # The systray never retries if no tray exists when it starts, so wait for the + # AppIndicator extension to provide one. This is done in the main process, + # rather than `ExecStartPre`, to not block activation while waiting + systemd.user.services.tailscale-systray.Service.ExecStart = lib.mkForce (toString ( + pkgs.writeShellScript "tailscale-systray" '' + until ${pkgs.systemd}/bin/busctl --user status org.kde.StatusNotifierWatcher >/dev/null 2>&1; do + sleep 1 + done + + exec ${lib.getExe config.services.tailscale.package} systray + '' + )); + programs.gnome-shell = { enable = true; extensions = [ - # Tailscale in the GNOME quick settings, including Mullvad exit nodes - { package = pkgs.gnomeExtensions.tailscale-qs; } + # GNOME has no system tray without it + { package = pkgs.gnomeExtensions.appindicator; } ]; }; };