Unverified Commit 068672d9 authored by r-vdp's avatar r-vdp
Browse files

nixos/mosquitto: emit plugin/plugin_opt_* instead of deprecated aliases

The auth_plugin and auth_opt_* config keys have been deprecated upstream
in favour of plugin and plugin_opt_*. Both spellings are accepted since
mosquitto 2.0, so this is safe regardless of the package version.

auth_plugin_deny_special_chars has no new-style alias and is kept as-is.
parent 0101675d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -239,7 +239,7 @@ let
        options = lib.mkOption {
          type = attrsOf optionType;
          description = ''
            Options for the auth plugin. Each key turns into a `auth_opt_*`
            Options for the plugin. Each key turns into a `plugin_opt_*`
            line in the config.
          '';
          default = { };
@@ -257,10 +257,10 @@ let
  formatAuthPlugin =
    plugin:
    [
      "auth_plugin ${plugin.plugin}"
      "plugin ${plugin.plugin}"
      "auth_plugin_deny_special_chars ${optionToString plugin.denySpecialChars}"
    ]
    ++ formatFreeform { prefix = "auth_opt_"; } plugin.options;
    ++ formatFreeform { prefix = "plugin_opt_"; } plugin.options;

  freeformListenerKeys = {
    accept_protocol_versions = 1;