mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
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.
This commit is contained in:
parent
e9b8212414
commit
1065bed9c4
3 changed files with 25 additions and 17 deletions
|
@ -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
|
"zero-configuration" host name lookups (see @uref{http://avahi.org/}), and
|
||||||
extends the name service cache daemon (nscd) so that it can resolve
|
extends the name service cache daemon (nscd) so that it can resolve
|
||||||
@code{.local} host names using
|
@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
|
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.
|
publish for this machine; otherwise, use the machine's actual host name.
|
||||||
|
|
|
@ -107,19 +107,24 @@ (define (avahi-dmd-service config)
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define avahi-service-type
|
(define avahi-service-type
|
||||||
(service-type (name 'avahi)
|
(let ((avahi-package (compose list avahi-configuration-avahi)))
|
||||||
(extensions
|
(service-type (name 'avahi)
|
||||||
(list (service-extension dmd-root-service-type
|
(extensions
|
||||||
avahi-dmd-service)
|
(list (service-extension dmd-root-service-type
|
||||||
(service-extension dbus-root-service-type
|
avahi-dmd-service)
|
||||||
(compose list
|
(service-extension dbus-root-service-type
|
||||||
avahi-configuration-avahi))
|
avahi-package)
|
||||||
(service-extension account-service-type
|
(service-extension account-service-type
|
||||||
(const %avahi-accounts))
|
(const %avahi-accounts))
|
||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
(const %avahi-activation))
|
(const %avahi-activation))
|
||||||
(service-extension nscd-service-type
|
(service-extension nscd-service-type
|
||||||
(const (list nss-mdns)))))))
|
(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)
|
(define* (avahi-service #:key (avahi avahi)
|
||||||
host-name
|
host-name
|
||||||
|
@ -132,7 +137,9 @@ (define* (avahi-service #:key (avahi avahi)
|
||||||
\"zero-configuration\" host name lookups (see @uref{http://avahi.org/}), and
|
\"zero-configuration\" host name lookups (see @uref{http://avahi.org/}), and
|
||||||
extends the name service cache daemon (nscd) so that it can resolve
|
extends the name service cache daemon (nscd) so that it can resolve
|
||||||
@code{.local} host names using
|
@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
|
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.
|
publish for this machine; otherwise, use the machine's actual host name.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
(use-modules (gnu) (gnu system nss))
|
(use-modules (gnu) (gnu system nss))
|
||||||
(use-service-modules desktop)
|
(use-service-modules desktop)
|
||||||
(use-package-modules xfce ratpoison avahi certs)
|
(use-package-modules xfce ratpoison certs)
|
||||||
|
|
||||||
(operating-system
|
(operating-system
|
||||||
(host-name "antelope")
|
(host-name "antelope")
|
||||||
|
@ -40,7 +40,6 @@
|
||||||
;; Add Xfce and Ratpoison; that allows us to choose
|
;; Add Xfce and Ratpoison; that allows us to choose
|
||||||
;; sessions using either of these at the log-in screen.
|
;; sessions using either of these at the log-in screen.
|
||||||
(packages (cons* xfce ratpoison ;desktop environments
|
(packages (cons* xfce ratpoison ;desktop environments
|
||||||
avahi ;useful tools
|
|
||||||
nss-certs ;for HTTPS access
|
nss-certs ;for HTTPS access
|
||||||
%base-packages))
|
%base-packages))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue