aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorClément Lassieur <clement@lassieur.org>2017-10-27 22:12:41 +0200
committerClément Lassieur <clement@lassieur.org>2017-11-26 15:30:57 +0100
commit274b9500d1d204a06a610da304a61d5b27bcce3e (patch)
tree91a9d962a6bfbb46230992b7bdd000eaf60233f0 /gnu
parent1f6f1a07c84c6a0c69803c8e9703237ace7abf77 (diff)
downloadguix-274b9500d1d204a06a610da304a61d5b27bcce3e.tar
guix-274b9500d1d204a06a610da304a61d5b27bcce3e.tar.gz
services: prosody: Allow to add raw content to the config file.
* doc/guix.texi (Messaging Services): Update accordingly. * gnu/services/messaging.scm (prosody-configuration)[raw-content]: New field. (raw-content?, serialize-raw-content): New procedures.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/messaging.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index f348ca1a38..b66d6ddb96 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -176,6 +176,12 @@
(serialize-string-list field-name val))
(define-maybe file-name)
+(define (raw-content? val)
+ (not (eq? val 'disabled)))
+(define (serialize-raw-content field-name val)
+ (format #t "~a" val))
+(define-maybe raw-content)
+
(define-configuration mod-muc-configuration
(name
(string "Prosody Chatrooms")
@@ -533,7 +539,12 @@ See also @url{http://prosody.im/doc/modules/mod_muc}."
(hostname
(string (configuration-missing-field 'ext-component 'hostname))
"Hostname of the component."
- ext-component)))
+ ext-component)
+
+ (raw-content
+ (maybe-raw-content 'disabled)
+ "Raw content that will be added to the configuration file."
+ common)))
;; Serialize Virtualhost line first.
(define (serialize-virtualhost-configuration config)