diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-01-16 11:18:34 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-16 14:07:37 +0100 |
commit | 2e04ab7147948b51d4e437ca9ba910530ac2a788 (patch) | |
tree | 47f8b503f775d43766afe7098911e09e28911971 /doc | |
parent | 39ad752cf9d2e2044ea8f4fc28bddfd9ad69f2c0 (diff) | |
download | patches-2e04ab7147948b51d4e437ca9ba910530ac2a788.tar patches-2e04ab7147948b51d4e437ca9ba910530ac2a788.tar.gz |
services: avahi: Deprecate the 'avahi-service' procedure.
* gnu/services/avahi.scm (<avahi-configuration>): Export getters. Add
default values.
(avahi-service-type)[default-value]: New field.
(avahi-service): Mark as deprecated.
* gnu/services/desktop.scm (%desktop-services): Use the 'service' form
instead of calling 'avahi-service'.
* gnu/tests/base.scm (%avahi-os): Likewise.
* doc/guix.texi (Base Services): Adjust example accordingly.
(Networking Services): Update accordingly.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 71 |
1 files changed, 48 insertions, 23 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 2039ff67cf..1cdf99dba7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10848,7 +10848,9 @@ system, you will want to append services to @var{%base-services}, like this: @example -(cons* (avahi-service) (lsh-service) %base-services) +(cons* (service avahi-service-type) + (service openssh-service-type) + %base-services) @end example @end defvr @@ -12709,31 +12711,54 @@ browsers, from accessing Facebook. The @code{(gnu services avahi)} provides the following definition. -@deffn {Scheme Procedure} avahi-service [#:avahi @var{avahi}] @ - [#:host-name #f] [#:publish? #t] [#:ipv4? #t] @ - [#:ipv6? #t] [#:wide-area? #f] @ - [#:domains-to-browse '()] [#:debug? #f] -Return a service that runs @command{avahi-daemon}, a system-wide +@defvr {Scheme Variable} avahi-service-type +This is the service that runs @command{avahi-daemon}, a system-wide mDNS/DNS-SD responder that allows for service discovery and -"zero-configuration" host name lookups (see @uref{http://avahi.org/}), and -extends the name service cache daemon (nscd) so that it can resolve -@code{.local} host names using -@uref{http://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}. Additionally, -add the @var{avahi} package to the system profile so that commands such as -@command{avahi-browse} are directly usable. - -If @var{host-name} is different from @code{#f}, use that as the host name to +``zero-configuration'' host name lookups (see @uref{http://avahi.org/}). +Its value must be a @code{zero-configuration} record---see below. + +This service extends the name service cache daemon (nscd) so that it can +resolve @code{.local} host names using +@uref{http://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}. @xref{Name +Service Switch}, for information on host name resolution. + +Additionally, add the @var{avahi} package to the system profile so that +commands such as @command{avahi-browse} are directly usable. +@end defvr + +@deftp {Data Type} avahi-configuration +Data type representation the configuration for Avahi. + +@table @asis + +@item @code{host-name} (default: @code{#f}) +If different from @code{#f}, use that as the host name to publish for this machine; otherwise, use the machine's actual host name. -When @var{publish?} is true, publishing of host names and services is allowed; -in particular, avahi-daemon will publish the machine's host name and IP -address via mDNS on the local network. +@item @code{publish?} (default: @code{#t}) +When true, allow host names and services to be published (broadcast) over the +network. -When @var{wide-area?} is true, DNS-SD over unicast DNS is enabled. +@item @code{publish-workstation?} (default: @code{#t}) +When true, @command{avahi-daemon} publishes the machine's host name and IP +address via mDNS on the local network. To view the host names published on +your local network, you can run: -Boolean values @var{ipv4?} and @var{ipv6?} determine whether to use IPv4/IPv6 -sockets. -@end deffn +@example +avahi-browse _workstation._tcp +@end example + +@item @code{wide-area?} (default: @code{#f}) +When true, DNS-SD over unicast DNS is enabled. + +@item @code{ipv4?} (default: @code{#t}) +@itemx @code{ipv6?} (default: @code{#t}) +These fields determine whether to use IPv4/IPv6 sockets. + +@item @code{domains-to-browse} (default: @code{'()}) +This is a list of domains to browse. +@end table +@end deftp @deffn {Scheme Variable} openvswitch-service-type This is the type of the @uref{http://www.openvswitch.org, Open vSwitch} @@ -22303,8 +22328,8 @@ want is to have @code{.local} host lookup working. Note that, in this case, in addition to setting the @code{name-service-switch} of the @code{operating-system} declaration, -you also need to use @code{avahi-service} (@pxref{Networking Services, -@code{avahi-service}}), or @var{%desktop-services}, which includes it +you also need to use @code{avahi-service-type} (@pxref{Networking Services, +@code{avahi-service-type}}), or @var{%desktop-services}, which includes it (@pxref{Desktop Services}). Doing this makes @code{nss-mdns} accessible to the name service cache daemon (@pxref{Base Services, @code{nscd-service}}). |