Create gpg dir

This commit is contained in:
Hans Muendelein 2024-11-02 21:40:14 +01:00
parent 30069de16f
commit 023588aaf3
1 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@ pkgs.mkShell {
]; ];
shellHook = '' shellHook = ''
# Set the pinentry program in gpg-agent.conf mkdir -p $HOME/.gnupg
echo "pinentry-program = ${pkgs.pinentry-curses}/bin/pinentry-curses" > $HOME/.gnupg/gpg-agent.conf echo "pinentry-program = ${pkgs.pinentry-curses}/bin/pinentry-curses" > $HOME/.gnupg/gpg-agent.conf
# Set the SSH agent socket for gpg-agent # Set the SSH agent socket for gpg-agent
@ -21,6 +21,8 @@ pkgs.mkShell {
# Import public key # Import public key
curl $(gpg --card-status | grep URL | cut -d' ' -f6) | gpg --import curl $(gpg --card-status | grep URL | cut -d' ' -f6) | gpg --import
gpg --card-status
touch dummy touch dummy
gpg -r hans --encrypt dummy gpg -r hans --encrypt dummy
gpg --decrypt dummy.gpg gpg --decrypt dummy.gpg