From 95eb2fa1cb95e4065f37888514414402a5adaa1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sun, 3 May 2026 13:53:11 +0200 Subject: [PATCH] devices: flag desktps, install tailscale tray if dektop --- devices.nix | 3 +++ homeConfigurations/muede/default.nix | 6 +----- homeModules/tailscale.nix | 4 ++++ nixosConfigurations.nix | 4 +++- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 homeModules/tailscale.nix diff --git a/devices.nix b/devices.nix index ea3c6f6..0eaa3b0 100644 --- a/devices.nix +++ b/devices.nix @@ -38,6 +38,7 @@ in }; muede-lpt2 = { system = "x86_64-linux"; + isDesktop = true; home-manager-users = { inherit (self.homeConfigurations) muede; }; @@ -50,6 +51,7 @@ in }; muede-pc2 = { system = "x86_64-linux"; + isDesktop = true; home-manager-users = { inherit (self.homeConfigurations) muede; }; @@ -63,6 +65,7 @@ in }; ronja-pc = { system = "x86_64-linux"; + isDesktop = true; home-manager-users = { inherit (self.homeConfigurations) ronja; }; diff --git a/homeConfigurations/muede/default.nix b/homeConfigurations/muede/default.nix index 185476d..87db634 100644 --- a/homeConfigurations/muede/default.nix +++ b/homeConfigurations/muede/default.nix @@ -80,7 +80,6 @@ onefetch servicepoint-cli servicepoint-simulator - tailscale telegram-desktop thunderbird vlc @@ -93,9 +92,6 @@ "idea.properties".text = "idea.filewatcher.executable.path = ${pkgs.fsnotifier}/bin/fsnotifier"; }; - services = { - trayscale.enable = true; - poweralertd.enable = true; - }; + services.poweralertd.enable = true; }; } diff --git a/homeModules/tailscale.nix b/homeModules/tailscale.nix new file mode 100644 index 0000000..34d1c3d --- /dev/null +++ b/homeModules/tailscale.nix @@ -0,0 +1,4 @@ +{ osConfig, thisDevice, ... }: +{ + services.tailscale-systray.enable = (thisDevice.isDesktop or false) && osConfig.my.tailscale.enable; +} diff --git a/nixosConfigurations.nix b/nixosConfigurations.nix index 29e78c3..c0d3a80 100644 --- a/nixosConfigurations.nix +++ b/nixosConfigurations.nix @@ -21,6 +21,7 @@ forDevice ( { device, system, + isDesktop ? false, home-manager-users ? { }, nixosSystem ? inputs.nixpkgs.lib.nixosSystem, ... @@ -87,7 +88,7 @@ forDevice ( }; } ] - ++ lib.optionals (home-manager-users != { }) [ + ++ lib.optionals isDesktop [ # Desktop config { home-manager = { @@ -100,6 +101,7 @@ forDevice ( # keep-sorted start self.homeModules.gnome-extensions self.homeModules.nano + self.homeModules.tailscale self.homeModules.templates self.homeModules.zsh-basics # keep-sorted end