dotfiles.nix/nixos/common/optional/key.nix

25 lines
553 B
Nix
Raw Normal View History

2024-01-21 21:03:57 +08:00
{ 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
2024-01-22 08:32:44 +08:00
# services.udev.packages = [ pkgs.yubikey-personalization ];
2024-01-21 21:03:57 +08:00
2024-01-22 08:32:44 +08:00
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
2024-01-21 21:03:57 +08:00
# Use our yubikey as a user login or for sudo access
security.pam.services = {
login.u2fAuth = true;
sudo.u2fAuth = true;
};
}