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.
This commit is contained in:
Alexander Heldt committed 2026-11-13 19:42:38 +01:00
1 parent b4b9136593
commit f31ac25f3d
1 file changed
+28 -4
+28 -4
View File
@@ -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; }
];
};
};