From 1906ea3e118637d09cc1b15ffc97db7714b40f72 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Fri, 10 Feb 2023 11:31:17 +0100 Subject: [PATCH] FIX : i3lock after remove yubikey --- hosts/dell-5590/nixos/services.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dell-5590/nixos/services.nix b/hosts/dell-5590/nixos/services.nix index f545f0d..d05ff16 100644 --- a/hosts/dell-5590/nixos/services.nix +++ b/hosts/dell-5590/nixos/services.nix @@ -83,7 +83,7 @@ }; udev.extraRules = '' - ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png"; + ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/alexandre/.Xauthority" RUN+="${pkgs.sudo}/bin/sudo -u alexandre ${pkgs.xautolock}/bin/xautolock -locknow" ''; }; }