Commit 5f8498f0823f
Changed files (1)
modules
profiles
modules/profiles/yubikey.nix
@@ -15,12 +15,6 @@ in
};
};
config = mkIf cfg.enable {
- services.udev.extraRules = ''
- # Yubico YubiKey
- KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", TAG+="uaccess", MODE="0660", GROUP="wheel"
- # ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
- '';
-
environment = {
systemPackages = with pkgs; [
yubico-piv-tool
@@ -28,5 +22,16 @@ in
yubioath-desktop
];
};
+ services = {
+ pcscd.enable = true;
+ udev = {
+ packages = with pkgs; [ yubikey-personalization ];
+ extraRules = ''
+# Yubico YubiKey
+KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", TAG+="uaccess", MODE="0660", GROUP="wheel"
+# ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
+ '';
+ }
+ }
};
}