diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-11-02 22:13:01 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-02 22:25:12 +0100 |
commit | 1065bed9c41f8a9b0718ae2db0fd42f286c1b8be (patch) | |
tree | c7e01032021bfe854056feb37b5cfc91e1f7ed8d /gnu/services/avahi.scm | |
parent | e9b8212414ce9eb113ab36c2353d0bfa1a1acab4 (diff) | |
download | guix-1065bed9c41f8a9b0718ae2db0fd42f286c1b8be.tar.gz |
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.
Diffstat (limited to 'gnu/services/avahi.scm')
-rw-r--r-- | gnu/services/avahi.scm | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm index 18131fe561..49a737f090 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 -@uref{http://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}. +@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 publish for this machine; otherwise, use the machine's actual host name. |