guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: doc: Update "Name Service Switch" to new service framework.


From: Ludovic Courtès
Subject: 01/03: doc: Update "Name Service Switch" to new service framework.
Date: Mon, 12 Oct 2015 22:06:44 +0000

civodul pushed a commit to branch master
in repository guix.

commit cc9c1f39350233bb3f22f01f942466a5cc7851f0
Author: Ludovic Courtès <address@hidden>
Date:   Mon Oct 12 21:24:59 2015 +0200

    doc: Update "Name Service Switch" to new service framework.
    
    * gnu/services/avahi.scm (avahi-service): Mention the extension of
      nscd.
    * doc/guix.texi (Networking Services): Update accordingly.
      (Name Service Switch): Remove '%my-base-services' example and
      explanation.
---
 doc/guix.texi          |   35 +++++++++--------------------------
 gnu/services/avahi.scm |    5 ++++-
 2 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 709ec0f..9956887 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6109,7 +6109,10 @@ The @code{(gnu services avahi)} provides the following 
definition.
           [#:domains-to-browse '()]
 Return a 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/}).
+"zero-configuration" host name lookups (see @uref{http://avahi.org/}), and
+extends the name service cache daemon (nscd) so that it can resolve
address@hidden host names using
address@hidden://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}.
 
 If @var{host-name} is different from @code{#f}, use that as the host name to
 publish for this machine; otherwise, use the machine's actual host name.
@@ -6587,31 +6590,11 @@ 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,
address@hidden must be told where to find the @code{nss-mdns}
-shared library (@pxref{Base Services, @code{nscd-service}}).  Since the
address@hidden service is part of @var{%base-services}, you may want to
-customize it by adding this snippet in the operating system
-configuration file:
-
address@hidden
-(use-modules (guix) (gnu))
-
-(define %my-base-services
-  ;; Replace the default nscd service with one that knows
-  ;; about nss-mdns.
-  (map (lambda (service)
-         (if (member 'nscd (service-provision service))
-             (nscd-service (nscd-configuration
-                             (name-services (list nss-mdns))))
-             service))
-       %base-services))
address@hidden example
-
address@hidden
address@hidden and then refer to @var{%my-base-services} instead of
address@hidden in the @code{operating-system} declaration.
-Lastly, this relies on the availability of the Avahi service
-(@pxref{Networking Services, @code{avahi-service}}).
+you also need to use @code{avahi-service} (@pxref{Networking Services,
address@hidden), 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,
address@hidden).
 
 For convenience, the following variables provide typical NSS
 configurations.
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index b576c39..18131fe 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -129,7 +129,10 @@
                         (domains-to-browse '()))
   "Return a 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/}).
+\"zero-configuration\" host name lookups (see @uref{http://avahi.org/}), and
+extends the name service cache daemon (nscd) so that it can resolve
address@hidden host names using
address@hidden://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}.
 
 If @var{host-name} is different from @code{#f}, use that as the host name to
 publish for this machine; otherwise, use the machine's actual host name.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]