niri and yubikey login config

This commit is contained in:
twoneis 2025-03-07 12:48:04 +01:00
parent b40f1fc5fb
commit 3641a241a1
3 changed files with 29 additions and 2 deletions

View file

@ -31,5 +31,15 @@ in
cue = true;
control = "required";
};
# Lock when removing yubikey
services.udev.extraRules = ''
ACTION=="remove",\
ENV{ID_BUS}=="usb",\
ENV{ID_MODEL_ID}=="0407",\
ENV{ID_VENDOR_ID}=="1050",\
ENV{ID_VENDOR}=="Yubico",\
RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
'';
})
]