dotfiles/modules/apps/yubikey/default.nix
Alejandro Angulo c811e70254
Fixed broken commit signing
Signed-off-by: Alejandro Angulo <iam@alejandr0angul0.dev>
2023-03-25 11:07:44 -07:00

36 lines
680 B
Nix

{
options,
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.aa.apps.yubikey;
in {
options.aa.apps.yubikey = with types; {
enable = mkEnableOption "yubikey";
};
config = mkIf cfg.enable {
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 first command as root)
# ykman otp chalresp --touch --generate 2
# ykpamcfg -2 -v
};
}