mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
home: services: ssh-agent: Handle setting of SSH_AUTH_SOCK.
* gnu/home/services/ssh.scm (home-ssh-agent-environment-variables): New procedure. (home-ssh-agent-service-type): Use it as ahome-environment-service type extension. * doc/guix.texi (Secure Shell): Remove advice about, and examples of setting SSH_AUTH_SOCK.
This commit is contained in:
parent
65f5398dfb
commit
2714c9ef2d
2 changed files with 7 additions and 18 deletions
|
@ -295,12 +295,18 @@ client,@command{ssh}, and by other tools such as @command{guix deploy}.")
|
|||
(fork+exec-command #$command #:log-file #$log-file)))
|
||||
(stop #~(make-kill-destructor)))))))
|
||||
|
||||
(define (home-ssh-agent-environment-variables config)
|
||||
'(("SSH_AUTH_SOCK"
|
||||
. "${SSH_AUTH_SOCK-${XDG_RUNTIME_DIR-$HOME/.cache}/ssh-agent/socket}")))
|
||||
|
||||
(define home-ssh-agent-service-type
|
||||
(service-type
|
||||
(name 'home-ssh-agent)
|
||||
(default-value (home-ssh-agent-configuration))
|
||||
(extensions
|
||||
(list (service-extension home-shepherd-service-type
|
||||
home-ssh-agent-services)))
|
||||
home-ssh-agent-services)
|
||||
(service-extension home-environment-variables-service-type
|
||||
home-ssh-agent-environment-variables)))
|
||||
(description
|
||||
"Install and configure @command{ssh-agent} as a Shepherd service.")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue