mirror of
https://github.com/nix-community/home-manager.git
synced 2025-04-10 11:04:35 +00:00
gpg-agent: add quietShellIntegration option
This commit is contained in:
parent
8bc5e4c9b2
commit
cc59ac7183
1 changed files with 12 additions and 2 deletions
|
@ -9,8 +9,10 @@ let
|
|||
|
||||
homedir = config.programs.gpg.homedir;
|
||||
|
||||
gpgConnectAgentOpts = optionalString cfg.quietShellIntegration "--quiet";
|
||||
|
||||
gpgSshSupportStr = ''
|
||||
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
${gpgPkg}/bin/gpg-connect-agent ${gpgConnectAgentOpts} updatestartuptty /bye > /dev/null
|
||||
'';
|
||||
|
||||
gpgInitStr = ''
|
||||
|
@ -29,7 +31,7 @@ let
|
|||
gpgNushellInitStr = ''
|
||||
$env.GPG_TTY = (tty)
|
||||
'' + optionalString cfg.enableSshSupport ''
|
||||
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye | ignore
|
||||
${gpgPkg}/bin/gpg-connect-agent ${gpgConnectAgentOpts} updatestartuptty /bye | ignore
|
||||
|
||||
$env.SSH_AUTH_SOCK = ($env.SSH_AUTH_SOCK? | default (${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket))
|
||||
'';
|
||||
|
@ -271,6 +273,14 @@ in {
|
|||
|
||||
enableZshIntegration =
|
||||
lib.hm.shell.mkZshIntegrationOption { inherit config; };
|
||||
|
||||
quietShellIntegration = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to pass the `--quiet` flag to gpg-connect-agent.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue