aboutsummaryrefslogtreecommitdiff
path: root/modules/services/gpg-agent.nix
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2018-03-04 22:18:17 +0100
committerRobert Helgesson <robert@rycee.net>2018-03-04 22:20:35 +0100
commitbc50202d0d1be0dbebcab712e04ea8d3dcbacfe2 (patch)
treef1a1e45dc40b21b1817ddae8bd20bf6471db3905 /modules/services/gpg-agent.nix
parent8fc8e158e2dcb4cd83dbf77011ce2a2633437dd5 (diff)
gpg-agent: do updatestartuptty only when SSH is enabled
Inspired by #163.
Diffstat (limited to 'modules/services/gpg-agent.nix')
-rw-r--r--modules/services/gpg-agent.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/services/gpg-agent.nix b/modules/services/gpg-agent.nix
index f193b564332..ea96312f34a 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