{ config, pkgs, ... }: { programs.gpg = { enable = true; mutableKeys = false; mutableTrust = false; publicKeys = [ { source = ../../static/keys/my_pub.asc; trust = "ultimate"; } ]; }; services.gpg-agent = { enable = true; enableSshSupport = true; enableZshIntegration = true; pinentryPackage = pkgs.pinentry.qt; extraConfig = '' allow-emacs-pinentry ''; }; home.sessionVariables = { SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"; }; }