This commit is contained in:
♥ Minnie ♥ 2024-09-20 20:24:55 +08:00
parent 1206380efd
commit 7203fc1ed9
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
51 changed files with 175 additions and 108 deletions

View 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;
}