From 967d0f93a211b1249c481ca93cc0874556b40435 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 4 Mar 2018 22:18:17 +0100 Subject: [PATCH] gpg-agent: do updatestartuptty only when SSH is enabled Inspired by #163. (cherry picked from commit bc50202d0d1be0dbebcab712e04ea8d3dcbacfe2) --- modules/services/gpg-agent.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/services/gpg-agent.nix b/modules/services/gpg-agent.nix index f193b564..ea96312f 100644 --- a/modules/services/gpg-agent.nix +++ b/modules/services/gpg-agent.nix @@ -9,8 +9,9 @@ let gpgInitStr = '' GPG_TTY="$(tty)" export GPG_TTY - ${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null - ''; + '' + + optionalString cfg.enableSshSupport + "${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null"; in