2022-09-23 03:21:12 +00:00
|
|
|
{
|
|
|
|
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";
|
|
|
|
};
|
2022-10-02 16:43:35 +00:00
|
|
|
# To set up, need to run (might need to run first command as root)
|
2022-09-23 03:21:12 +00:00
|
|
|
# ykman otp chalresp --touch --generate 2
|
|
|
|
# ykpamcfg -2 -v
|
|
|
|
}
|