[systemd] Add ssh-agent to linux to fix magit ssh agent issue
This commit is contained in:
@ -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
systemd/.config/systemd/user/ssh-agent.service
Normal file
11
systemd/.config/systemd/user/ssh-agent.service
Normal file
@ -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
|
||||
Reference in New Issue
Block a user