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.
This commit is contained in:
parent
1f6f1a07c8
commit
274b9500d1
|
@ -14170,7 +14170,7 @@ See @url{http://prosody.im/doc/configure#virtual_host_settings}.
|
||||||
|
|
||||||
Available @code{virtualhost-configuration} fields are:
|
Available @code{virtualhost-configuration} fields are:
|
||||||
|
|
||||||
all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus:
|
all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, @code{raw-content}, plus:
|
||||||
@deftypevr {@code{virtualhost-configuration} parameter} string domain
|
@deftypevr {@code{virtualhost-configuration} parameter} string domain
|
||||||
Domain you wish Prosody to serve.
|
Domain you wish Prosody to serve.
|
||||||
@end deftypevr
|
@end deftypevr
|
||||||
|
@ -14192,7 +14192,7 @@ Defaults to @samp{()}.
|
||||||
|
|
||||||
Available @code{int-component-configuration} fields are:
|
Available @code{int-component-configuration} fields are:
|
||||||
|
|
||||||
all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus:
|
all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, @code{raw-content}, plus:
|
||||||
@deftypevr {@code{int-component-configuration} parameter} string hostname
|
@deftypevr {@code{int-component-configuration} parameter} string hostname
|
||||||
Hostname of the component.
|
Hostname of the component.
|
||||||
@end deftypevr
|
@end deftypevr
|
||||||
|
@ -14245,7 +14245,7 @@ Defaults to @samp{()}.
|
||||||
|
|
||||||
Available @code{ext-component-configuration} fields are:
|
Available @code{ext-component-configuration} fields are:
|
||||||
|
|
||||||
all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus:
|
all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, @code{raw-content}, plus:
|
||||||
@deftypevr {@code{ext-component-configuration} parameter} string component-secret
|
@deftypevr {@code{ext-component-configuration} parameter} string component-secret
|
||||||
Password which the component will use to log in.
|
Password which the component will use to log in.
|
||||||
@end deftypevr
|
@end deftypevr
|
||||||
|
@ -14265,6 +14265,10 @@ Interface Prosody listens on for component connections.
|
||||||
Defaults to @samp{"127.0.0.1"}.
|
Defaults to @samp{"127.0.0.1"}.
|
||||||
@end deftypevr
|
@end deftypevr
|
||||||
|
|
||||||
|
@deftypevr {@code{prosody-configuration} parameter} maybe-raw-content raw-content
|
||||||
|
Raw content that will be added to the configuration file.
|
||||||
|
@end deftypevr
|
||||||
|
|
||||||
It could be that you just want to get a @code{prosody.cfg.lua}
|
It could be that you just want to get a @code{prosody.cfg.lua}
|
||||||
up and running. In that case, you can pass an
|
up and running. In that case, you can pass an
|
||||||
@code{opaque-prosody-configuration} record as the value of
|
@code{opaque-prosody-configuration} record as the value of
|
||||||
|
|
|
@ -176,6 +176,12 @@
|
||||||
(serialize-string-list field-name val))
|
(serialize-string-list field-name val))
|
||||||
(define-maybe file-name)
|
(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
|
(define-configuration mod-muc-configuration
|
||||||
(name
|
(name
|
||||||
(string "Prosody Chatrooms")
|
(string "Prosody Chatrooms")
|
||||||
|
@ -533,7 +539,12 @@ See also @url{http://prosody.im/doc/modules/mod_muc}."
|
||||||
(hostname
|
(hostname
|
||||||
(string (configuration-missing-field 'ext-component 'hostname))
|
(string (configuration-missing-field 'ext-component 'hostname))
|
||||||
"Hostname of the component."
|
"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.
|
;; Serialize Virtualhost line first.
|
||||||
(define (serialize-virtualhost-configuration config)
|
(define (serialize-virtualhost-configuration config)
|
||||||
|
|
Loading…
Reference in New Issue