Package: prosody
Version: 0.9.7-2+deb8u3
Severity: wishlist
Hello,
I am exploring ways of managing prosody configuration, and I would like to
deploy in a way that the original prosody.cfg.lua remains unchanged, and I do
everything via conf.d files.
The first issue I hit is that prosody.cfg.lua defines `VirtualHost
"example.com"`,
and all configuration following that line goes to the example.com virtualhost.
This means that I cannot add a file /etc/prosody/conf.d/local.cfg.lua that
contains global directives like:
c2s_require_encryption = true
s2s_secure_auth = true
s2s_insecure_domains = { "gmail.com" }
I should however be able to work around that by redefining VirtualHost to "*",
though I haven't tried yet.
The second issue is that I cannot seem to be able to access the configuration
values set so far. I would like this to be able to add modules without
clobbering the default list of modules, as in doing something like this:
table.insert(modules_enabled, "carbons")
table.insert(modules_enabled, "privacy")
table.insert(modules_enabled, "blocking")
table.insert(modules_enabled, "smacks")
table.insert(modules_enabled, "mam")
table.insert(modules_enabled, "throttle_presence")
table.insert(modules_enabled, "filter_chatstates")
However, because the prosody config loader redefines __newindex for the
configuration code, values that are set are not found in the normal Lua
environment, and I couldn't find a way to access them.
Also, I didn't find a way to get prosody to dump all the configuration that it
has read, so I am currently not sure that if I set a global option in an
included config file, it actually rewrites its previous value.
If these kinds of overrides/updates in included file were possible, I could
have a deployment configuration that maintains maintainer changes on the
original config file, which I feel is a nicely more future-proof way of
managing it.
Enrico
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)