mirror of
https://github.com/nix-community/home-manager
synced 2024-12-02 07:59:46 +01:00
gpg-agent: add quietShellIntegration option
This commit is contained in:
parent
b3d5ea65d8
commit
0bc81de9cc
1 changed files with 12 additions and 2 deletions
|
@ -9,8 +9,10 @@ let
|
||||||
|
|
||||||
homedir = config.programs.gpg.homedir;
|
homedir = config.programs.gpg.homedir;
|
||||||
|
|
||||||
|
gpgConnectAgentOpts = optionalString cfg.quietShellIntegration "--quiet";
|
||||||
|
|
||||||
gpgSshSupportStr = ''
|
gpgSshSupportStr = ''
|
||||||
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
${gpgPkg}/bin/gpg-connect-agent ${gpgConnectAgentOpts} updatestartuptty /bye > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
gpgInitStr = ''
|
gpgInitStr = ''
|
||||||
|
@ -25,7 +27,7 @@ let
|
||||||
gpgNushellInitStr = ''
|
gpgNushellInitStr = ''
|
||||||
$env.GPG_TTY = (tty)
|
$env.GPG_TTY = (tty)
|
||||||
'' + optionalString cfg.enableSshSupport ''
|
'' + 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))
|
$env.SSH_AUTH_SOCK = ($env.SSH_AUTH_SOCK? | default (${gpgPkg}/bin/gpgconf --list-dirs agent-ssh-socket))
|
||||||
'';
|
'';
|
||||||
|
@ -229,6 +231,14 @@ in {
|
||||||
enableNushellIntegration = mkEnableOption "Nushell integration" // {
|
enableNushellIntegration = mkEnableOption "Nushell integration" // {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
quietShellIntegration = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to pass the `--quiet` flag to gpg-connect-agent.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue