dotfiles.nix/nixos/common/optional/key.nix
2024-01-22 08:32:44 +08:00

25 lines
553 B
Nix

{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# Configure your YubiKey via the command line
yubikey-manager
# Enables files to be encrypted to age identities stored on YubiKeys
age-plugin-yubikey
];
# GPG and SSH support
# services.udev.packages = [ pkgs.yubikey-personalization ];
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# Use our yubikey as a user login or for sudo access
security.pam.services = {
login.u2fAuth = true;
sudo.u2fAuth = true;
};
}