mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
console: enable ssh-agent
This commit is contained in:
parent
8ac7ebc54a
commit
02fd51a72b
2 changed files with 22 additions and 0 deletions
9
.profile
9
.profile
|
|
@ -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
|
||||
|
|
|
|||
13
Console.org
13
Console.org
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue