diff --git a/.config/systemd/user/default.target.wants/ssh-agent.service b/.config/systemd/user/default.target.wants/ssh-agent.service new file mode 120000 index 0000000..8c9a931 --- /dev/null +++ b/.config/systemd/user/default.target.wants/ssh-agent.service @@ -0,0 +1 @@ +/home/barak/.config/systemd/user/ssh-agent.service \ No newline at end of file diff --git a/.config/systemd/user/ssh-agent.service b/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..87d6c04 --- /dev/null +++ b/.config/systemd/user/ssh-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=forking +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target diff --git a/.zprofile b/.zprofile index 3beeed0..7296da2 100644 --- a/.zprofile +++ b/.zprofile @@ -37,3 +37,4 @@ ENV=$HOME/.zshrc; export ENV #alias ls='ls -FG' #alias la='ls -FGal' #source ~/.zshrc +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"