diff options
| author | Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | 2023-03-05 17:17:04 +0100 |
|---|---|---|
| committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2023-03-16 14:26:34 +0100 |
| commit | 2c2f382e757d5eef39e8460a20ac75a1b1f8b22e (patch) | |
| tree | 55235a11ea78bfd7c02786a076f6896b8ef0bc0b /doc | |
| parent | 076fa659efc6521def67d2d1040cd5d81fc1ce7d (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.texi | 56 |
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@* | |||
| 36 | Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@* | 36 | Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner@* |
| 37 | Copyright @copyright{} 2016 John Darrington@* | 37 | Copyright @copyright{} 2016 John Darrington@* |
| 38 | Copyright @copyright{} 2016, 2017 Nikita Gillmann@* | 38 | Copyright @copyright{} 2016, 2017 Nikita Gillmann@* |
| 39 | Copyright @copyright{} 2016, 2017, 2018, 2019, 2020 Jan Nieuwenhuizen@* | 39 | Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2023 Jan Nieuwenhuizen@* |
| 40 | Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@* | 40 | Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@* |
| 41 | Copyright @copyright{} 2016 Alex ter Weele@* | 41 | Copyright @copyright{} 2016 Alex ter Weele@* |
| 42 | Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@* | 42 | Copyright @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 | ||
| 42468 | The @uref{https://www.openssh.com, OpenSSH package} includes a daemon, | ||
| 42469 | the @command{ssh-agent} command, that manages keys to connect to remote | ||
| 42470 | machines using the @acronym{SSH, secure shell} protocol. With the | ||
| 42471 | @code{(gnu home services ssh-agent)} service, you can configure the | ||
| 42472 | OpenSSH ssh-agent to run upon login. | ||
| 42473 | |||
| 42474 | When using the @code{home-ssh-agent-service-type}, you need to add your | ||
| 42475 | @file{~/.bash_profile}: | ||
| 42476 | |||
| 42477 | @example | ||
| 42478 | SSH_AUTH_SOCK=$@{XDG_RUNTIME_DIR-$HOME/.cache@}/ssh-agent/socket | ||
| 42479 | export SSH_AUTH_SOCK | ||
| 42480 | @end example | ||
| 42481 | |||
| 42482 | Of course, you can do that using the @code{home-bash-service-type}, by | ||
| 42483 | adding 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 | |||
| 42491 | Here is an example of a service and its configuration that you could add | ||
| 42492 | to 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 | ||
| 42501 | This 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 | ||
| 42506 | Available @code{home-ssh-agent-configuration} fields are: | ||
| 42507 | |||
| 42508 | @table @asis | ||
| 42509 | @item @code{git} (default: @code{git}) (type: file-like) | ||
| 42510 | The git package to use. | ||
| 42511 | |||
| 42512 | @item @code{socket-directory} (default: @code{@env{XDG_RUNTIME_DIR}/ssh-agent"}) (type: string) | ||
| 42513 | The directory to write the ssh-agent's @file{socket} file. | ||
| 42514 | |||
| 42515 | @item @code{extra-options} (default: @code{'()}) | ||
| 42516 | Extra 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 |
