-
-
Save msteen/6d1737a589e2ee5b492632182abdf658 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
# The script uses either the CLI or GUI program depending on being in a shell or not. | |
environment.interactiveShellInit = "export PINENTRY_USER_DATA=$TTY"; | |
nixpkgs.overlays = [ | |
(self: super: { | |
pinentry-dynamic = super.writeBash "pinentry-dynamic" '' | |
# http://unix.stackexchange.com/questions/236746/change-pinentry-program-temporarily-with-gpg-agent | |
# https://github.com/keybase/keybase-issues/issues/1099#issuecomment-59313502 | |
if [[ -z $PINENTRY_USER_DATA ]]; then | |
exec ${super.pinentry}/bin/pinentry-gtk-2 "$@" | |
else | |
exec ${super.pinentry}/bin/pinentry-curses --ttyname "$PINENTRY_USER_DATA" "$@" | |
fi | |
''; | |
}) | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment