From 72cf2df4e2700bc4cabb49a5f1e2a95431edb622 Mon Sep 17 00:00:00 2001 From: Nikita Uvarov Date: Mon, 21 Aug 2017 15:01:36 +0200 Subject: [PATCH] gpg-agent: add zsh support --- modules/services/gpg-agent.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/services/gpg-agent.nix b/modules/services/gpg-agent.nix index 1d015397..c1adeb38 100644 --- a/modules/services/gpg-agent.nix +++ b/modules/services/gpg-agent.nix @@ -5,6 +5,11 @@ with lib; let cfg = config.services.gpg-agent; + gpgInitStr = '' + GPG_TTY="$(tty)" + export GPG_TTY + gpg-connect-agent updatestartuptty /bye > /dev/null + ''; in @@ -44,11 +49,8 @@ in SSH_AUTH_SOCK = "\${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"; }; - programs.bash.initExtra = '' - GPG_TTY="$(tty)" - export GPG_TTY - gpg-connect-agent updatestartuptty /bye > /dev/null - ''; + programs.bash.initExtra = gpgInitStr; + programs.zsh.initExtra = gpgInitStr; } # The systemd units below are direct translations of the