guix-commits
[Top][All Lists]
Advanced

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

02/03: services: configuration: Show default values of list types.


From: Clément Lassieur
Subject: 02/03: services: configuration: Show default values of list types.
Date: Mon, 27 Nov 2017 21:51:31 -0500 (EST)

snape pushed a commit to branch master
in repository guix.

commit 19ff1f2687ab5ceeee6335dce2794590d0f4aa27
Author: Clément Lassieur <address@hidden>
Date:   Fri Nov 24 22:55:28 2017 +0100

    services: configuration: Show default values of list types.
    
    * doc/guix.texi (Messaging Services): Regenerate it.
    * gnu/services/configuration.scm (show-default?): Check VAL rather than 
DEFAULT.
    * gnu/services/messaging.scm (show-default?): Check VAL rather than DEFAULT.
    (prosody-configuration)[modules-enabled]: Remove default value from 
docstring.
---
 doc/guix.texi                  | 7 +++++--
 gnu/services/configuration.scm | 3 ++-
 gnu/services/messaging.scm     | 6 +++---
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2a68256..17a8f4d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13991,8 +13991,9 @@ Defaults to @samp{#f}.
 @deftypevr address@hidden parameter} module-list modules-enabled
 This is the list of modules Prosody will load on startup.  It looks for
 @code{mod_modulename.lua} in the plugins folder, so make sure that exists too.
-Documentation on modules can be found at: @url{http://prosody.im/doc/modules}.
-Defaults to @samp{%default-modules-enabled}.
+Documentation on modules can be found at:
address@hidden://prosody.im/doc/modules}.
+Defaults to @samp{("roster" "saslauth" "tls" "dialback" "disco" "carbons" 
"private" "blocklist" "vcard" "version" "uptime" "time" "ping" "pep" "register" 
"admin_adhoc")}.
 @end deftypevr
 
 @deftypevr address@hidden parameter} string-list modules-disabled
@@ -14096,6 +14097,7 @@ Defaults to @samp{#f}.
 @deftypevr address@hidden parameter} string-list disable-sasl-mechanisms
 Set of mechanisms that will never be offered.  See
 @url{https://prosody.im/doc/modules/mod_saslauth}.
+Defaults to @samp{("DIGEST-MD5")}.
 @end deftypevr
 
 @deftypevr address@hidden parameter} boolean s2s-require-encryption?
@@ -14263,6 +14265,7 @@ Hostname of the component.
 
 @deftypevr address@hidden parameter} non-negative-integer-list component-ports
 Port(s) Prosody listens on for component connections.
+Defaults to @samp{(5347)}.
 @end deftypevr
 
 @deftypevr address@hidden parameter} string component-interface
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index 0a2219e..c45340f 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andy Wingo <address@hidden>
 ;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2017 Clément Lassieur <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -165,7 +166,7 @@
                                (configuration-field-default-value-thunk f)
                                (lambda _ '%invalid))))
                 (define (show-default? val)
-                  (or (string? default) (number? default) (boolean? default)
+                  (or (string? val) (number? val) (boolean? val)
                       (and (symbol? val) (not (eq? val '%invalid)))
                       (and (list? val) (and-map show-default? val))))
                 `(deftypevr (% (category
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index c75c715..d57a756 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -354,8 +354,8 @@ Example: @code{(admins '(\"user1@@example.com\" 
\"user2@@example.net\"))}"
      (module-list %default-modules-enabled)
      "This is the list of modules Prosody will load on startup.  It looks for
 @code{mod_modulename.lua} in the plugins folder, so make sure that exists too.
-Documentation on modules can be found at: @url{http://prosody.im/doc/modules}.
-Defaults to @samp{%default-modules-enabled}."
+Documentation on modules can be found at:
address@hidden://prosody.im/doc/modules}."
      common)
 
     (modules-disabled
@@ -722,7 +722,7 @@ See also @url{http://prosody.im/doc/modules/mod_muc}.";
                                      (display c))
                                    str))))
             (define (show-default? val)
-              (or (string? default) (number? default) (boolean? default)
+              (or (string? val) (number? val) (boolean? val)
                   (and (list? val) (and-map show-default? val))))
             (format #t "@deftypevr address@hidden parameter} ~a ~a\n~a\n"
                     configuration-name field-type field-name field-docs)



reply via email to

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