From 95853e61a74a285c3045cc3763dfafaa42af329d Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Mon, 5 Jun 2023 14:34:46 +0200 Subject: home: services: ssh: Add 'match-criteria' option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/home/services/ssh.scm (serialize-address-family): Raise '&formatted-message' instead of '&error'. (ssh-match-keywords): New variable. (match-criteria?): New procedure. (match-criteria): New maybe type. (openssh-host)[name]: Turn into 'maybe-string'. [match-criteria]: New field. (serialize-openssh-host): Adjust accordingly. * doc/guix.texi (Secure Shell): Document it. Signed-off-by: Ludovic Courtès --- doc/guix.texi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index a71751142b..395fc25818 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -43100,11 +43100,21 @@ Available @code{openssh-host} fields are: @table @asis @item @code{name} (type: string) -Name of this host declaration. +Name of this host declaration. A @code{openssh-host} must define only +@code{name} or @code{match-criteria}. Use host-name @code{\"*\"} for +top-level options. @item @code{host-name} (type: maybe-string) Host name---e.g., @code{"foo.example.org"} or @code{"192.168.1.2"}. +@item @code{match-criteria} (type: maybe-match-criteria) +When specified, this string denotes the set of hosts to which the entry +applies, superseding the @code{host-name} field. Its first element must be +all or one of @code{ssh-match-keywords}. The rest of the elements are +arguments for the keyword, or other criteria. A @code{openssh-host} must +define only @code{name} or @code{match-criteria}. Other host configuration +options will apply to all hosts matching @code{match-criteria}. + @item @code{address-family} (type: maybe-address-family) Address family to use when connecting to this host: one of @code{AF_INET} (for IPv4 only), @code{AF_INET6} (for IPv6 only). -- cgit 1.4.1