From e7bcf06d1988ee6d56a1d5d5c9d66f189a5f5df1 Mon Sep 17 00:00:00 2001 From: sajenim Date: Tue, 7 May 2024 20:43:58 +0800 Subject: [PATCH] fix gnupg invalid time pinentry --- nixos/common/optional/key.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nixos/common/optional/key.nix b/nixos/common/optional/key.nix index f039b8d..4fc93a5 100644 --- a/nixos/common/optional/key.nix +++ b/nixos/common/optional/key.nix @@ -4,14 +4,19 @@ environment.systemPackages = with pkgs; [ # Enables files to be encrypted to age identities stored on YubiKeys age-plugin-yubikey - # Cryptfile + # Setup dm-crypt managed device-mapper mappings. cryptsetup - # Yubikey can be used as a smart card for secure encryption - gnupg # Configure your YubiKey via the command line yubikey-manager ]; + # Manage secret (private) keys. + programs.gnupg.agent = { + enable = true; + # Fix: invalid time when using keytocard + pinentryFlavor = "gtk2"; + }; + # Use our yubikey as a user login or for sudo access security.pam.services = { login.u2fAuth = true;