From 913562b98b3278c7b6087827c375f5acfb6bcb66 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:06:29 +0200 Subject: [PATCH] feat(yubikey-touch-detector): fix? --- nixos/modules/hardware/yubikey/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nixos/modules/hardware/yubikey/default.nix b/nixos/modules/hardware/yubikey/default.nix index 708b9c1..2134c87 100644 --- a/nixos/modules/hardware/yubikey/default.nix +++ b/nixos/modules/hardware/yubikey/default.nix @@ -25,11 +25,17 @@ in { ]; # Send a notification if the YubiKey is waiting for touch. - systemd.user.services.yubikey-touch-detector = { + systemd.services.yubikey-touch-detector = { enable = true; description = "Detects when your YubiKey is waiting for a touch"; - path = with pkgs; [ yubikey-touch-detector ]; - script = ''exec yubikey-touch-detector --notify''; + path = with pkgs; [ + gnupg + yubikey-touch-detector + ]; + wantedBy = [ + "graphical-session.target" + ]; + script = ''exec yubikey-touch-detector --libnotify''; environment.YUBIKEY_TOUCH_DETECTOR_LIBNOTIFY = "true"; }; };