#!/bin/sh

SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
GPG_TTY=$(tty)
export GPG_TTY SSH_AUTH_SOCK
gpgconf --launch gpg-agent
mkdir -p ~/.ssh
gpg --export-ssh-key eu@euandre.org > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa.pub

eval "$(direnv hook bash)"
