guix-commits
[Top][All Lists]
Advanced

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

02/03: services: ntp: Document 'ntp-service-type' and 'ntp-configuration


From: Ludovic Courtès
Subject: 02/03: services: ntp: Document 'ntp-service-type' and 'ntp-configuration'.
Date: Fri, 19 Oct 2018 17:39:58 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 64791eb7e1dceb0940cc881e84820f0170298b34
Author: Ludovic Courtès <address@hidden>
Date:   Fri Oct 19 22:46:23 2018 +0200

    services: ntp: Document 'ntp-service-type' and 'ntp-configuration'.
    
    * gnu/services/networking.scm (<ntp-configuration>)[servers]: Add
    default value.
    (ntp-service-type)[default-value]: New field.
    (ntp-service): Mark as deprecated.
    * gnu/services/desktop.scm (%desktop-services): Use (service
    ntp-service-type) instead of calling 'ntp-service'.
    * doc/guix.texi (Networking Services): Document 'ntp-service-type' and
    'ntp-configuration'.
---
 doc/guix.texi               | 39 ++++++++++++++++++++++++++++-----------
 gnu/services/desktop.scm    |  4 ++--
 gnu/services/networking.scm |  8 +++++---
 3 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f4f1994..12346c4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11817,20 +11817,37 @@ objects}).
 @end table
 @end deftp
 
address@hidden NTP
address@hidden NTP (Network Time Protocol), service
 @cindex real time clock
address@hidden {Scheme Procedure} ntp-service [#:ntp @var{ntp}] @
-  [#:servers @var{%ntp-servers}] @
-  [#:allow-large-adjustment? #f]
-Return a service that runs the daemon from @var{ntp}, the
address@hidden://www.ntp.org, Network Time Protocol package}.  The daemon will
-keep the system clock synchronized with that of @var{servers}.
address@hidden determines whether @command{ntpd} is allowed to
-make an initial adjustment of more than 1,000 seconds.
address@hidden deffn
address@hidden {Scheme Variable} ntp-service-type
+This is the type of the service running the the @uref{http://www.ntp.org,
+Network Time Protocol (NTP)} daemon, @command{ntpd}.  The daemon will keep the
+system clock synchronized with that of the specified NTP servers.
+
+The value of this service is an @code{ntpd-configuration} object, as described
+below.
address@hidden defvr
+
address@hidden {Data Type} ntp-configuration
+This is the data type for the NTP service configuration.
+
address@hidden @asis
address@hidden @code{servers} (default: @code{%ntp-servers})
+This is the list of servers (host names) with which @command{ntpd} will be
+synchronized.
+
address@hidden @code{allow-large-adjustment?} (default: @code{#f})
+This determines whether @command{ntpd} is allowed to make an initial
+adjustment of more than 1,000 seconds.
+
address@hidden @code{ntp} (default: @code{ntp})
+The NTP package to use.
address@hidden table
address@hidden deftp
 
 @defvr {Scheme Variable} %ntp-servers
-List of host names used as the default NTP servers.
+List of host names used as the default NTP servers.  These are servers of the
address@hidden://www.ntppool.org/en/, NTP Pool Project}.
 @end defvr
 
 @cindex OpenNTPD
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 1e8c02c..e038f97 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2015 Andy Wingo <address@hidden>
 ;;; Copyright © 2015 Mark H Weaver <address@hidden>
 ;;; Copyright © 2016 Sou Bunnbu <address@hidden>
@@ -996,7 +996,7 @@ as expected.")))
          (elogind-service)
          (dbus-service)
 
-         (ntp-service)
+         (service ntp-service-type)
 
          x11-socket-directory-service
 
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index b764cde..bfa6e29 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -297,7 +297,8 @@ Protocol (DHCP) client, on all the non-loopback network 
interfaces."
   ntp-configuration?
   (ntp      ntp-configuration-ntp
             (default ntp))
-  (servers  ntp-configuration-servers)
+  (servers  ntp-configuration-servers
+            (default %ntp-servers))
   (allow-large-adjustment? ntp-allow-large-adjustment?
                            (default #f)))
 
@@ -370,9 +371,10 @@ restrict -6 ::1\n"))
                 (description
                  "Run the @command{ntpd}, the Network Time Protocol (NTP)
 daemon of the @uref{http://www.ntp.org, Network Time Foundation}.  The daemon
-will keep the system clock synchronized with that of the given servers.")))
+will keep the system clock synchronized with that of the given servers.")
+                (default-value (ntp-configuration))))
 
-(define* (ntp-service #:key (ntp ntp)
+(define* (ntp-service #:key (ntp ntp)             ;deprecated
                       (servers %ntp-servers)
                       allow-large-adjustment?)
   "Return a service that runs the daemon from @var{ntp}, the



reply via email to

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