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 --- hosts/c-pc/configuration.nix | 10 ---------- snowfall/modules/home/tools/gpg/default.nix | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/hosts/c-pc/configuration.nix b/hosts/c-pc/configuration.nix index acf8ab2..eccae16 100644 --- a/hosts/c-pc/configuration.nix +++ b/hosts/c-pc/configuration.nix @@ -27,17 +27,7 @@ }; }; - programs = { - gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - dconf.enable = true; - }; - services = { - pcscd.enable = true; printing.enable = true; hardware.openrgb.enable = true; 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