diff options
author | Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | 2023-03-17 12:40:16 +0100 |
---|---|---|
committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2023-03-17 12:44:33 +0100 |
commit | 2714c9ef2d6cb42f15c2f284449f602467f0d1c0 (patch) | |
tree | 32dc25d0037cfe872c0c40da829da1d2322ea1c6 /gnu/home | |
parent | 65f5398dfb2d15413dd2f559ed6d79a5307effd5 (diff) |
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.
Diffstat (limited to 'gnu/home')
-rw-r--r-- | gnu/home/services/ssh.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm index dc37ecf329..01917a29cd 100644 --- a/gnu/home/services/ssh.scm +++ b/gnu/home/services/ssh.scm @@ -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."))) |