guix-commits
[Top][All Lists]
Advanced

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

06/07: services: avahi: Add Avahi to the system profile.


From: Ludovic Courtès
Subject: 06/07: services: avahi: Add Avahi to the system profile.
Date: Mon, 02 Nov 2015 21:27:22 +0000

civodul pushed a commit to branch master
in repository guix.

commit 1065bed9c41f8a9b0718ae2db0fd42f286c1b8be
Author: Ludovic Courtès <address@hidden>
Date:   Mon Nov 2 22:13:01 2015 +0100

    services: avahi: Add Avahi to the system profile.
    
    * gnu/services/avahi.scm (avahi-service-type): Extend
      PROFILE-SERVICE-TYPE.
      (avahi-service): Adjust docstring.
    * doc/guix.texi (Networking Services): Adjust accordingly.
    * gnu/system/examples/desktop.tmpl (packages): Remove AVAHI.
---
 doc/guix.texi                    |    4 +++-
 gnu/services/avahi.scm           |   35 +++++++++++++++++++++--------------
 gnu/system/examples/desktop.tmpl |    3 +--
 3 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 28c9a9c..3afa496 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6571,7 +6571,9 @@ 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
address@hidden://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}.
address@hidden://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}.  
Additionally,
+add the @var{avahi} package to the system profile so that commands such as
address@hidden are directly usable.
 
 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.
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index 18131fe..49a737f 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -107,19 +107,24 @@
            (stop #~(make-kill-destructor))))))
 
 (define avahi-service-type
-  (service-type (name 'avahi)
-                (extensions
-                 (list (service-extension dmd-root-service-type
-                                          avahi-dmd-service)
-                       (service-extension dbus-root-service-type
-                                          (compose list
-                                                   avahi-configuration-avahi))
-                       (service-extension account-service-type
-                                          (const %avahi-accounts))
-                       (service-extension activation-service-type
-                                          (const %avahi-activation))
-                       (service-extension nscd-service-type
-                                          (const (list nss-mdns)))))))
+  (let ((avahi-package (compose list avahi-configuration-avahi)))
+    (service-type (name 'avahi)
+                  (extensions
+                   (list (service-extension dmd-root-service-type
+                                            avahi-dmd-service)
+                         (service-extension dbus-root-service-type
+                                            avahi-package)
+                         (service-extension account-service-type
+                                            (const %avahi-accounts))
+                         (service-extension activation-service-type
+                                            (const %avahi-activation))
+                         (service-extension nscd-service-type
+                                            (const (list nss-mdns)))
+
+                         ;; Provide 'avahi-browse', 'avahi-resolve', etc. in
+                         ;; the system profile.
+                         (service-extension profile-service-type
+                                            avahi-package))))))
 
 (define* (avahi-service #:key (avahi avahi)
                         host-name
@@ -132,7 +137,9 @@ 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
address@hidden://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}.
address@hidden://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}.  
Additionally,
+add the @var{avahi} package to the system profile so that commands such as
address@hidden are directly usable.
 
 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.
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index ff2a1b7..7a479d1 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -3,7 +3,7 @@
 
 (use-modules (gnu) (gnu system nss))
 (use-service-modules desktop)
-(use-package-modules xfce ratpoison avahi certs)
+(use-package-modules xfce ratpoison certs)
 
 (operating-system
   (host-name "antelope")
@@ -40,7 +40,6 @@
   ;; Add Xfce and Ratpoison; that allows us to choose
   ;; sessions using either of these at the log-in screen.
   (packages (cons* xfce ratpoison    ;desktop environments
-                   avahi             ;useful tools
                    nss-certs         ;for HTTPS access
                    %base-packages))
 



reply via email to

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