From 274b9500d1d204a06a610da304a61d5b27bcce3e Mon Sep 17 00:00:00 2001 From: Clément Lassieur Date: Fri, 27 Oct 2017 22:12:41 +0200 Subject: 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. --- gnu/services/messaging.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu') 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) -- cgit 1.4.1