From 4b3983d895194b21e4d263eebe03c179a5f39dc7 Mon Sep 17 00:00:00 2001 From: zephrynis Date: Tue, 28 Jul 2026 00:51:47 +0100 Subject: [PATCH] tailscale: add service + Trayscale, enable on host Tailscale with --operator=zephrynis so the daemon is drivable without sudo (Trayscale + tailscale switch/login from a plain shell), plus the Trayscale systray app. Imported into the nixos-pc host. Co-Authored-By: Claude Opus 4.8 (1M context) --- hosts/nixos-pc/default.nix | 1 + modules/tailscale.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 modules/tailscale.nix diff --git a/hosts/nixos-pc/default.nix b/hosts/nixos-pc/default.nix index 0c7319e..d594649 100644 --- a/hosts/nixos-pc/default.nix +++ b/hosts/nixos-pc/default.nix @@ -7,6 +7,7 @@ ../../modules/desktop.nix ../../modules/nvidia.nix ../../modules/gaming.nix + ../../modules/tailscale.nix ]; networking.hostName = "nixos-pc"; diff --git a/modules/tailscale.nix b/modules/tailscale.nix new file mode 100644 index 0000000..80e7872 --- /dev/null +++ b/modules/tailscale.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +{ + services.tailscale = { + enable = true; + # Let zephrynis drive the daemon without sudo — required for Trayscale, + # and makes `tailscale switch` / `login` work from a plain shell too + extraSetFlags = [ "--operator=zephrynis" ]; + }; + + # Tray app for the bar's systray: status toggle + account switcher + # (work/personal via Tailscale fast user switching). Autostarted from + # hypr/custom/execs.lua (appended in home/zephrynis.nix). + environment.systemPackages = [ pkgs.trayscale ]; +}