From bc50202d0d1be0dbebcab712e04ea8d3dcbacfe2 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. --- 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 f193b5643..ea96312f3 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