From bd43b5fa64235b2145cdeeb7409cd11636e7754e Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Sat, 8 Feb 2025 12:35:46 -0800 Subject: migration: gpg-agent --- snowfall/modules/home/tools/gpg/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'snowfall') diff --git a/snowfall/modules/home/tools/gpg/default.nix b/snowfall/modules/home/tools/gpg/default.nix index 7d69137..297d9d0 100644 --- a/snowfall/modules/home/tools/gpg/default.nix +++ b/snowfall/modules/home/tools/gpg/default.nix @@ -16,5 +16,17 @@ in { }; programs.gpg.enable = true; + + services.gpg-agent = { + enable = true; + enableSshSupport = true; + pinentryPackage = (pkgs.writeShellScriptBin "pinentry-wrapper" '' + if [[ -v DISPLAY ]]; then + exec ${pkgs.pinentry-gnome3}/bin/pinentry-gnome3 "$@" + fi + + exec ${pkgs.pinentry-gnome3}/bin/pinentry-tty "$@" + ''); + }; }; } -- cgit v1.2.3