diff --git a/.profile b/.profile index 8b486f3..68ef667 100755 --- a/.profile +++ b/.profile @@ -34,21 +34,9 @@ fi # My paths:1 ends here #!/usr/bin/env bash -# [[file:Console.org::*ssh-agent][ssh-agent:1]] -SSH_AGENT_DIR="/tmp" - -if [ "$IS_ANDROID" == "true" ]; then - SSH_AGENT_DIR="/data/data/com.termux/files/tmp" - mkdir -p $SSH_AGENT_DIR -fi - -if ! pgrep -u "$USER" ssh-agent > /dev/null; then - ssh-agent -t 1h > "$SSH_AGENT_DIR/ssh-agent.env" -fi -if [[ ! -f "$SSH_AUTH_SOCK" ]]; then - source "$SSH_AGENT_DIR/ssh-agent.env" >/dev/null -fi -# ssh-agent:1 ends here +# [[file:Console.org::*ssh-agent][ssh-agent:3]] +export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket +# ssh-agent:3 ends here # [[file:Console.org::*Misc settings][Misc settings:1]] export JUPYTER_CONFIG_DIR=$HOME/.config/jupyter diff --git a/Arch.org b/Arch.org index e1467ba..2fa7b3f 100644 --- a/Arch.org +++ b/Arch.org @@ -64,6 +64,12 @@ gpg --edit-key trust #+end_src +Also the following to =~/.ssh/config=: +#+begin_src conf-space +Host * + AddKeysToAgent yes +#+end_src + Then, clone the dotfiles repo with =yadm=: #+begin_src bash yadm clone git@github.com:SqrtMinusOne/dotfiles.git diff --git a/Console.org b/Console.org index a667c85..d99a6f4 100644 --- a/Console.org +++ b/Console.org @@ -87,9 +87,8 @@ fi ** 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 +I used to do the below, as instructed by [[https://wiki.archlinux.org/title/SSH_keys#SSH_agents][ArchWiki]]: +#+begin_src bash :tangle no SSH_AGENT_DIR="/tmp" if [ "$IS_ANDROID" == "true" ]; then @@ -104,6 +103,16 @@ if [[ ! -f "$SSH_AUTH_SOCK" ]]; then source "$SSH_AGENT_DIR/ssh-agent.env" >/dev/null fi #+end_src + +But for now switched to the [[https://wiki.archlinux.org/title/SSH_keys#Start_ssh-agent_with_systemd_user][systemd unit]], which requires: +#+begin_src bash :tangle no +systemctl --user enable --now ssh-agent.service +#+end_src + +#+begin_src bash +export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket +#+end_src + ** Misc settings Set Jupyter config PATH. I keep it from my Guix config where it defaulted to some readonly folder. #+begin_src sh @@ -713,17 +722,15 @@ References: - [[https://github.com/alacritty/alacritty/blob/master/alacritty.yml][default config]] #+begin_src toml :noweb yes -decorations = "none" - [colors.bright] -Black = "<>" -Red = "<>" -Green = "<>" -Yellow = "<>" -Blue = "<>" -Magenta = "<>" -Cyan = "<>" -White = "<>" +black = "<>" +red = "<>" +green = "<>" +yellow = "<>" +blue = "<>" +magenta = "<>" +cyan = "<>" +white = "<>" [colors.normal] black = "<>"