fix pinentry selector in pkgs
This commit is contained in:
parent
3e1a92bac0
commit
597844c60c
1 changed files with 16 additions and 13 deletions
|
|
@ -5,18 +5,21 @@ pkgs.writeShellApplication {
|
||||||
pinentry-all
|
pinentry-all
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
case $(tty) in
|
if [ -v XDG_SESSION_TYPE ]; then
|
||||||
/dev/tty[1-9])
|
case $XDG_SESSION_TYPE in
|
||||||
pinentry-curses;;
|
tty)
|
||||||
/dev/pts/*)
|
pinentry-tty;;
|
||||||
if [ -v SSH_CLIENT ] && [ -n "$SSH_CLIENT" ]; then
|
|
||||||
pinentry-curses
|
|
||||||
else
|
|
||||||
pinentry-qt
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
pinentry-curses;;
|
pinentry-qt;;
|
||||||
esac
|
esac
|
||||||
|
elif [ -v SSH_CLIENT ] && [ -n "$SSH_CLIENT" ]; then
|
||||||
|
pinentry-tty
|
||||||
|
elif [ -v WAYLAND_DISPLAY ] && [ -n "$WAYLAND_DISPLAY" ]; then
|
||||||
|
pinentry-qt
|
||||||
|
elif [ -v DISPLAY ] && [ -n "$DISPLAY" ]; then
|
||||||
|
pinentry-qt
|
||||||
|
else
|
||||||
|
pinentry-tty
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue