diff --git a/Makefile b/Makefile index 6e11c5f..697250b 100644 --- a/Makefile +++ b/Makefile @@ -157,6 +157,11 @@ stow-scripts: scripts mkdir -p $(STOW_TARGET) $(STOW) $< +stow-ssh: ssh + $(STOW) $< + # Enable & start ssh-agent service + systemctl enable --now --user ssh-agent.service + stow-system-X: STOW_TARGET=/ stow-system-X: system-X sudo $(STOW) $< diff --git a/ssh/.config/systemd/user/ssh-agent.service b/ssh/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..9428410 --- /dev/null +++ b/ssh/.config/systemd/user/ssh-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=simple +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target