nix-config/modules/mixins/gnupg.nix
Oliver Davies 14583971ed Configure pam-gnupg
Automatically unlock my GPG key on login to make it easier to work with
pass, neomutt, etc.

See https://github.com/cruegge/pam-gnupg.
2025-04-22 00:37:38 +01:00

25 lines
445 B
Nix

{ pkgs, ... }:
{
security.pam.services.login.gnupg.enable = true;
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-qt;
};
};
home-manager.users.opdavies = {
home.file = {
".gnupg/gpg-agent.conf".text = ''
allow-preset-passphrase
default-cache-ttl 600
max-cache-ttl 7200
enable-ssh-support
'';
};
};
}