add yubikey support

This commit is contained in:
Fabian Montero 2024-09-17 13:42:25 -06:00
parent 6e9af8b303
commit a6be515925
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 36 additions and 0 deletions

View file

@ -45,6 +45,9 @@
vlc
vpsfree-client
vscodium-fhs
yubikey-manager
yubico-pam
yubikey-personalization
zip
zola
zoom-us

View file

@ -10,6 +10,7 @@
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./yubikey.nix
];
# Use the systemd-boot EFI boot loader.

View file

@ -0,0 +1,32 @@
{
config,
pkgs,
lib,
...
}: {
services = {
pcscd.enable = true;
udev.packages = [pkgs.yubikey-personalization];
};
environment.etc."pkcs11/modules/ykcs11".text = ''
module: ${pkgs.yubico-piv-tool}/lib/libykcs11.so
'';
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
security.pam.services = {
login.u2fAuth = true;
sudo.u2fAuth = true;
};
security.pam.yubico = {
enable = true;
debug = false;
mode = "challenge-response";
id = ["27677315"];
};
}