mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
In esoteric setups, automatically setting GPG_TTY to current tty is not
desired on every shell startup. This change adds configuration options
to allow user to disable that if desired.
(cherry picked from commit df6010551d
)
This commit is contained in:
parent
d14adb99f3
commit
d93d56ab8c
1 changed files with 15 additions and 3 deletions
|
@ -170,6 +170,18 @@ in
|
|||
now.
|
||||
'';
|
||||
};
|
||||
|
||||
enableBashIntegration = mkEnableOption "Bash integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableZshIntegration = mkEnableOption "Zsh integration" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableFishIntegration = mkEnableOption "Fish integration" // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -206,9 +218,9 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
programs.bash.initExtra = gpgInitStr;
|
||||
programs.zsh.initExtra = gpgInitStr;
|
||||
programs.fish.interactiveShellInit = ''
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration gpgInitStr;
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration gpgInitStr;
|
||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
set -gx GPG_TTY (tty)
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue