1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

gpg-agent: avoid console output when using ssh

Without `--quiet` gpg-connect-agent sometimes prints

```
gpg-connect-agent: connection to the agent is in restricted mode
```
This commit is contained in:
Dawid Ciężarkiewicz 2024-07-06 21:17:47 -07:00 committed by Robert Helgesson
parent d6b0c05457
commit 1e8c62c651

View file

@ -20,7 +20,7 @@ let
homedir = config.programs.gpg.homedir;
gpgSshSupportStr = ''
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
${gpgPkg}/bin/gpg-connect-agent --quiet updatestartuptty /bye > /dev/null
'';
gpgInitStr =
@ -47,7 +47,7 @@ let
$env.GPG_TTY = (tty)
''
+ optionalString cfg.enableSshSupport ''
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye | ignore
${gpgPkg}/bin/gpg-connect-agent --quiet updatestartuptty /bye | ignore
$env.SSH_AUTH_SOCK = ($env.SSH_AUTH_SOCK? | default (${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket))
'';