summaryrefslogtreecommitdiffstats
path: root/tv/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-10-08 23:39:00 +0200
committertv <tv@krebsco.de>2022-10-08 23:39:13 +0200
commit3a65e49a98fc1721cbc34859a18d324789abfeee (patch)
treeaced893d34a6b24ca5b3f4f997cbdb8000533797 /tv/3modules
parentc7ccc2f4b945f17ebc39e7ec4986aaafb1f61a25 (diff)
tv ejabberd: JSON > YAML
Diffstat (limited to 'tv/3modules')
-rw-r--r--tv/3modules/ejabberd/default.nix31
1 files changed, 3 insertions, 28 deletions
diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix
index ce736f4..edc5296 100644
--- a/tv/3modules/ejabberd/default.nix
+++ b/tv/3modules/ejabberd/default.nix
@@ -12,7 +12,7 @@
fi
'';
- settingsFormat = pkgs.formats.yaml {};
+ settingsFormat = pkgs.formats.json {};
in {
options.tv.ejabberd = {
@@ -25,32 +25,7 @@ in {
};
configFile = mkOption {
type = types.either types.package types.absolute-pathname;
- default =
- (settingsFormat.generate "ejabberd.yaml" cfg.settings)
- # XXX ejabberd cannot parse MQTT topic filters enclosed in single
- # quotes. By changing the YAML formatting style, double quotes will
- # be used instead.
- #
- # Related error message:
- # Invalid value of option modules->mod_mqtt->access_publish:
- # Malformed topic filter
- #
- .overrideAttrs (old: {
- nativeBuildInputs =
- filter
- (pkg: (parseDrvName pkg.name).name != "remarshal")
- old.nativeBuildInputs
- ++
- singleton (pkgs.symlinkJoin {
- name = "remarshal";
- paths = [
- (pkgs.writeDashBin "json2yaml" ''
- exec ${pkgs.remarshal}/bin/json2yaml --yaml-style \> "$@"
- '')
- pkgs.remarshal
- ];
- });
- });
+ default = settingsFormat.generate "ejabberd.yaml" cfg.settings;
};
ciphers = mkOption {
type = types.listOf types.str;
@@ -72,7 +47,7 @@ in {
readOnly = true;
default =
imap
- (i: const /* yaml */ "/tmp/credentials/certfile${toJSON i}")
+ (i: const "/tmp/credentials/certfile${toJSON i}")
cfg.certfiles;
};
hosts = mkOption {