summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>2023-03-05 17:17:04 +0100
committerJanneke Nieuwenhuizen <janneke@gnu.org>2023-03-16 14:26:34 +0100
commit2c2f382e757d5eef39e8460a20ac75a1b1f8b22e (patch)
tree55235a11ea78bfd7c02786a076f6896b8ef0bc0b /doc
parent076fa659efc6521def67d2d1040cd5d81fc1ce7d (diff)
gnu: home: services: Add home-ssh-agent-service-type.
* gnu/home/services/ssh.scm: (<home-ssh-agent-configuration>): New type. (home-ssh-agent-services): New procedure. (home-ssh-agent-service-type): New variable. * doc/guix.texi (Secure Shell): Document it.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi56
1 files changed, 55 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index aa98d7df4b6..8baa2f32240 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36,7 +36,7 @@ Copyright @copyright{} 2016, 2017, 2018, 2021 Chris Marusich@*
36Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@* 36Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@*
37Copyright @copyright{} 2016 John Darrington@* 37Copyright @copyright{} 2016 John Darrington@*
38Copyright @copyright{} 2016, 2017 Nikita Gillmann@* 38Copyright @copyright{} 2016, 2017 Nikita Gillmann@*
39Copyright @copyright{} 2016, 2017, 2018, 2019, 2020 Jan Nieuwenhuizen@* 39Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2023 Jan Nieuwenhuizen@*
40Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@* 40Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@*
41Copyright @copyright{} 2016 Alex ter Weele@* 41Copyright @copyright{} 2016 Alex ter Weele@*
42Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@* 42Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@*
@@ -42464,6 +42464,60 @@ Extra content appended as-is to this @code{Host} block in
42464 42464
42465@c %end of fragment 42465@c %end of fragment
42466 42466
42467@cindex ssh-agent
42468The @uref{https://www.openssh.com, OpenSSH package} includes a daemon,
42469the @command{ssh-agent} command, that manages keys to connect to remote
42470machines using the @acronym{SSH, secure shell} protocol. With the
42471@code{(gnu home services ssh-agent)} service, you can configure the
42472OpenSSH ssh-agent to run upon login.
42473
42474When using the @code{home-ssh-agent-service-type}, you need to add your
42475@file{~/.bash_profile}:
42476
42477@example
42478SSH_AUTH_SOCK=$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket
42479export SSH_AUTH_SOCK
42480@end example
42481
42482Of course, you can do that using the @code{home-bash-service-type}, by
42483adding something like:
42484
42485@lisp
42486(environment-variables
42487 '(("SSH_AUTH_SOCK"
42488 . "$@{SSH_AUTH_SOCK-$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket@}")))
42489@end lisp
42490
42491Here is an example of a service and its configuration that you could add
42492to the @code{services} field of your @code{home-environment}:
42493
42494@lisp
42495(service home-ssh-agent-service-type
42496 (home-ssh-agent-configuration
42497 (extra-options '("-t" "1h30m"))))
42498@end lisp
42499
42500@defvr {Scheme Variable} home-ssh-agent-service-type
42501This is the type of the @code{git daemon} home service, whose value is an
42502@code{home-ssh-agent-configuration} object.
42503@end defvr
42504
42505@deftp {Data Type} home-ssh-agent-configuration
42506Available @code{home-ssh-agent-configuration} fields are:
42507
42508@table @asis
42509@item @code{git} (default: @code{git}) (type: file-like)
42510The git package to use.
42511
42512@item @code{socket-directory} (default: @code{@env{XDG_RUNTIME_DIR}/ssh-agent"}) (type: string)
42513The directory to write the ssh-agent's @file{socket} file.
42514
42515@item @code{extra-options} (default: @code{'()})
42516Extra options will be passed to @command{ssh-agent}, please run
42517@command{man ssh-agent} for more information.
42518
42519@end table
42520@end deftp
42467 42521
42468@node Desktop Home Services 42522@node Desktop Home Services
42469@subsection Desktop Home Services 42523@subsection Desktop Home Services