Skip to content

Commit

Permalink
console: enable ssh-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
SqrtMinusOne committed Jan 23, 2025
1 parent 8ac7ebc commit 02fd51a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .profile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ if [ -d "$HOME/.guix-extra-profiles" ] ; then
fi
# SSL Certs:1 ends here

# [[file:Console.org::*ssh-agent][ssh-agent:1]]
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
# ssh-agent:1 ends here

# [[file:Console.org::*Guix settings][Guix settings:1]]
if [ -z "$IS_ANDROID" ] && [ -z "$NO_GUIX" ] ; then
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
Expand Down
13 changes: 13 additions & 0 deletions Console.org
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ if [ -d "$HOME/.guix-extra-profiles" ] ; then
export CURL_CA_BUNDLE="$SSL_CERT_FILE"
fi
#+end_src
** ssh-agent
I'm paranoid so I encrypt my SSH keys.

Got the idea for below from [[https://wiki.archlinux.org/title/SSH_keys#SSH_agents][ArchWiki]]:

#+begin_src bash
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
#+end_src
** Guix settings
Enable extra profiles

Expand Down

0 comments on commit 02fd51a

Please sign in to comment.