[GnuPG] fix Pinentry support, use pinentry-all package by default

Also remove now redundant shell init code (already done in upstream
module)
This commit is contained in:
Antoine Viallon 2024-05-25 13:40:43 +02:00
parent 9e16a0c068
commit 937225bbfb
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -11,20 +11,19 @@ in {
programs.gnupg = {
agent.enable = true;
dirmngr.enable = true;
agent.pinentryPackage = pinentrySwitcher;
agent.pinentryPackage = pkgs.pinentry-all;
agent.enableSSHSupport = true;
agent.enableExtraSocket = true;
agent.enableBrowserSocket = true;
};
environment.interactiveShellInit = mkAfter ''
${config.programs.gnupg.package}/bin/gpg-connect-agent --quiet updatestartuptty /bye
'';
environment.shellInit = ''
if tty --silent; then
export GPG_TTY="$(tty)"
gpg-connect-agent /bye
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
else
alias gpg=${gpgNoTTY}/bin/gpg-no-tty
fi
alias gpg=${gpgNoTTY}/bin/gpg-no-tty
'';
environment.systemPackages = [