Ver código fonte

[systemd] Add ssh-agent to linux to fix magit ssh agent issue

Colin Powell 7 horas atrás
pai
commit
bab439fdf8

+ 1 - 0
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

+ 11 - 0
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