From 1d717f581b7b001b2a1293277a1d3386fca5b87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Tri=C3=B1anes?= Date: Wed, 6 Mar 2024 11:54:01 +0100 Subject: [PATCH] gpg-agent: Fix nushell integration --- modules/services/gpg-agent.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/services/gpg-agent.nix b/modules/services/gpg-agent.nix index 70e4df0a..685698b7 100644 --- a/modules/services/gpg-agent.nix +++ b/modules/services/gpg-agent.nix @@ -27,9 +27,7 @@ let '' + optionalString cfg.enableSshSupport '' ${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye | ignore - if not "SSH_AUTH_SOCK" in $env { - $env.SSH_AUTH_SOCK = (${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket) - } + $env.SSH_AUTH_SOCK = ($env.SSH_AUTH_SOCK? | default (${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket)) ''; # mimic `gpgconf` output for use in `systemd` unit definitions.