From bab439fdf899686f86822456521ff803cb6c4df1 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 12 Jan 2026 17:05:16 -0500 Subject: [PATCH] [systemd] Add ssh-agent to linux to fix magit ssh agent issue --- systemd/.config/systemd/user/emacs.service | 1 + systemd/.config/systemd/user/ssh-agent.service | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 systemd/.config/systemd/user/ssh-agent.service diff --git a/systemd/.config/systemd/user/emacs.service b/systemd/.config/systemd/user/emacs.service index b184d5f..489f3b9 100644 --- a/systemd/.config/systemd/user/emacs.service +++ b/systemd/.config/systemd/user/emacs.service @@ -5,6 +5,7 @@ After=graphical.target [Service] Type=forking +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket ExecStart=/usr/bin/emacs --daemon ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)" Restart=on-failure diff --git a/systemd/.config/systemd/user/ssh-agent.service b/systemd/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..6c9d27e --- /dev/null +++ b/systemd/.config/systemd/user/ssh-agent.service @@ -0,0 +1,11 @@ +[Unit] +Description=SSH agent + +[Service] +Type=simple +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK +Restart=on-failure + +[Install] +WantedBy=default.target