don't lock when yubikey is unplugged
This commit is contained in:
parent
ee12047750
commit
dcf3d5dc57
1 changed files with 1 additions and 13 deletions
|
@ -1,20 +1,8 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
_: {
|
||||
security.pam = {
|
||||
services = {
|
||||
login.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
};
|
||||
};
|
||||
|
||||
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"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue