Made yubikey config reusable

This commit is contained in:
Alejandro Angulo 2022-09-22 20:21:12 -07:00
parent ee956f735e
commit 2811bd995f
4 changed files with 30 additions and 17 deletions

24
common/yubikey.nix Normal file
View file

@ -0,0 +1,24 @@
{
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [
yubikey-manager
yubikey-agent
yubico-pam
];
services.pcscd.enable = true;
security.pam.yubico = {
enable = true;
#debug = true;
mode = "challenge-response";
# Uncomment below for 2FA
#control = "required";
};
# To set up, need to run (might need to run as root)
# ykman otp chalresp --touch --generate 2
# ykpamcfg -2 -v
}