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 | |
| parent | e9b8212414ce9eb113ab36c2353d0bfa1a1acab4 (diff) | |
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')
| -rw-r--r-- | gnu/services/avahi.scm | 35 | ||||
| -rw-r--r-- | gnu/system/examples/desktop.tmpl | 3 |
2 files changed, 22 insertions, 16 deletions
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm index 18131fe561f..49a737f0909 100644 --- a/gnu/services/avahi.scm +++ b/gnu/services/avahi.scm | |||
| @@ -107,19 +107,24 @@ | |||
| 107 | (stop #~(make-kill-destructor)))))) | 107 | (stop #~(make-kill-destructor)))))) |
| 108 | 108 | ||
| 109 | (define avahi-service-type | 109 | (define avahi-service-type |
| 110 | (service-type (name 'avahi) | 110 | (let ((avahi-package (compose list avahi-configuration-avahi))) |
| 111 | (extensions | 111 | (service-type (name 'avahi) |
| 112 | (list (service-extension dmd-root-service-type | 112 | (extensions |
| 113 | avahi-dmd-service) | 113 | (list (service-extension dmd-root-service-type |
| 114 | (service-extension dbus-root-service-type | 114 | avahi-dmd-service) |
| 115 | (compose list | 115 | (service-extension dbus-root-service-type |
| 116 | avahi-configuration-avahi)) | 116 | avahi-package) |
| 117 | (service-extension account-service-type | 117 | (service-extension account-service-type |
| 118 | (const %avahi-accounts)) | 118 | (const %avahi-accounts)) |
| 119 | (service-extension activation-service-type | 119 | (service-extension activation-service-type |
| 120 | (const %avahi-activation)) | 120 | (const %avahi-activation)) |
| 121 | (service-extension nscd-service-type | 121 | (service-extension nscd-service-type |
| 122 | (const (list nss-mdns))))))) | 122 | (const (list nss-mdns))) |
| 123 | |||
| 124 | ;; Provide 'avahi-browse', 'avahi-resolve', etc. in | ||
| 125 | ;; the system profile. | ||
| 126 | (service-extension profile-service-type | ||
| 127 | avahi-package)))))) | ||
| 123 | 128 | ||
| 124 | (define* (avahi-service #:key (avahi avahi) | 129 | (define* (avahi-service #:key (avahi avahi) |
| 125 | host-name | 130 | host-name |
| @@ -132,7 +137,9 @@ mDNS/DNS-SD responder that allows for service discovery and | |||
| 132 | \"zero-configuration\" host name lookups (see @uref{http://avahi.org/}), and | 137 | \"zero-configuration\" host name lookups (see @uref{http://avahi.org/}), and |
| 133 | extends the name service cache daemon (nscd) so that it can resolve | 138 | extends the name service cache daemon (nscd) so that it can resolve |
| 134 | @code{.local} host names using | 139 | @code{.local} host names using |
| 135 | @uref{http://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}. | 140 | @uref{http://0pointer.de/lennart/projects/nss-mdns/, nss-mdns}. Additionally, |
| 141 | add the @var{avahi} package to the system profile so that commands such as | ||
| 142 | @command{avahi-browse} are directly usable. | ||
| 136 | 143 | ||
| 137 | If @var{host-name} is different from @code{#f}, use that as the host name to | 144 | If @var{host-name} is different from @code{#f}, use that as the host name to |
| 138 | publish for this machine; otherwise, use the machine's actual host name. | 145 | 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 ff2a1b7306c..7a479d1123b 100644 --- a/gnu/system/examples/desktop.tmpl +++ b/gnu/system/examples/desktop.tmpl | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | (use-modules (gnu) (gnu system nss)) | 4 | (use-modules (gnu) (gnu system nss)) |
| 5 | (use-service-modules desktop) | 5 | (use-service-modules desktop) |
| 6 | (use-package-modules xfce ratpoison avahi certs) | 6 | (use-package-modules xfce ratpoison certs) |
| 7 | 7 | ||
| 8 | (operating-system | 8 | (operating-system |
| 9 | (host-name "antelope") | 9 | (host-name "antelope") |
| @@ -40,7 +40,6 @@ | |||
| 40 | ;; Add Xfce and Ratpoison; that allows us to choose | 40 | ;; Add Xfce and Ratpoison; that allows us to choose |
| 41 | ;; sessions using either of these at the log-in screen. | 41 | ;; sessions using either of these at the log-in screen. |
| 42 | (packages (cons* xfce ratpoison ;desktop environments | 42 | (packages (cons* xfce ratpoison ;desktop environments |
| 43 | avahi ;useful tools | ||
| 44 | nss-certs ;for HTTPS access | 43 | nss-certs ;for HTTPS access |
| 45 | %base-packages)) | 44 | %base-packages)) |
| 46 | 45 | ||
