{ lib, pkgs, ... }: { programs.gpg = { enable = true; }; services.gpg-agent = { enable = true; enableSshSupport = true; enableFishIntegration = true; enableZshIntegration = true; pinentryPackage = pkgs.pinentry-gnome3; }; # Prevent clobbering SSH_AUTH_SOCK home.sessionVariables.GSM_SKIP_SSH_AGENT_WORKAROUND = "1"; # Disable gnome-keyring ssh-agent xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = '' ${lib.fileContents "${pkgs.gnome-keyring}/etc/xdg/autostart/gnome-keyring-ssh.desktop"} Hidden=true ''; }