refactor
This commit is contained in:
parent
1206380efd
commit
7203fc1ed9
51 changed files with 175 additions and 108 deletions
26
nixos/common/optional/yubikey.nix
Normal file
26
nixos/common/optional/yubikey.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Enables files to be encrypted to age identities stored on YubiKeys
|
||||
age-plugin-yubikey
|
||||
# Setup dm-crypt managed device-mapper mappings.
|
||||
cryptsetup
|
||||
# Configure your YubiKey via the command line
|
||||
yubikey-manager
|
||||
];
|
||||
|
||||
# Manage secret (private) keys.
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
# Fix: invalid time when using keytocard
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
};
|
||||
|
||||
# Use our yubikey as a user login or for sudo access
|
||||
security.pam.services = {
|
||||
login.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
};
|
||||
|
||||
# Enable udev rules for gnupg smart cards
|
||||
hardware.gpgSmartcards.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue