diff --git a/config.yaml b/config.yaml index ba6b578..1ad406a 100644 --- a/config.yaml +++ b/config.yaml @@ -63,6 +63,12 @@ dotfiles: d_local_bin: src: local/bin dst: ~/.local/bin + f_ssh_config: + src: ssh/config + dst: ~/.ssh/config + f_ssh-agent.service: + src: config/systemd/user/ssh-agent.service + dst: ~/.config/systemd/user/ssh-agent.service profiles: everywhere: dotfiles: @@ -90,6 +96,7 @@ profiles: - f_pam_environment - f_xdg_desktop_portal_wlr_config - d_local_bin + - f_ssh-agent.service knafeh: dotfiles: - d_vim @@ -111,3 +118,4 @@ profiles: - f_xdg_desktop_portal_wlr_config - f_geoclue-agent.service - d_local_bin + - f_ssh-agent.service diff --git a/dotfiles/config/systemd/user/ssh-agent.service b/dotfiles/config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..8e2dc4c --- /dev/null +++ b/dotfiles/config/systemd/user/ssh-agent.service @@ -0,0 +1,13 @@ +# From: https://wiki.archlinux.org/title/SSH_keys#SSH_agents +[Unit] +Description=SSH key agent + +[Service] +Type=simple +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +# DISPLAY required for ssh-askpass to work +Environment=DISPLAY=:0 +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target diff --git a/dotfiles/ssh/config b/dotfiles/ssh/config new file mode 100644 index 0000000..07ff3a5 --- /dev/null +++ b/dotfiles/ssh/config @@ -0,0 +1 @@ +AddKeysToAgent yes