summary refs log tree commit diff
path: root/nixos/tests/mosquitto.nix
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2021-05-21 19:23:01 +0200
committertomberek <tomberek@users.noreply.github.com>2021-10-22 16:06:55 -0400
commit56d0b5cd6a61da42cca5be52b216bad9d1ff2b59 (patch)
treed5130830244bc733d86dceb65517125c96f00551 /nixos/tests/mosquitto.nix
parent4b91c770d05b1c9c165daad168f550e47347946d (diff)
downloadnixpkgs-56d0b5cd6a61da42cca5be52b216bad9d1ff2b59.tar
nixpkgs-56d0b5cd6a61da42cca5be52b216bad9d1ff2b59.tar.gz
nixpkgs-56d0b5cd6a61da42cca5be52b216bad9d1ff2b59.tar.bz2
nixpkgs-56d0b5cd6a61da42cca5be52b216bad9d1ff2b59.tar.lz
nixpkgs-56d0b5cd6a61da42cca5be52b216bad9d1ff2b59.tar.xz
nixpkgs-56d0b5cd6a61da42cca5be52b216bad9d1ff2b59.tar.zst
nixpkgs-56d0b5cd6a61da42cca5be52b216bad9d1ff2b59.zip
nixos/mosquitto: rewrite the module
mosquitto needs a lot of attention concerning its config because it doesn't
parse it very well, often ignoring trailing parts of lines, duplicated config
keys, or just looking back way further in the file to associated config keys
with previously defined items than might be expected.

this replaces the mosquitto module completely. we now have a hierarchical config
that flattens out to the mosquitto format (hopefully) without introducing spooky
action at a distance.
Diffstat (limited to 'nixos/tests/mosquitto.nix')
-rw-r--r--nixos/tests/mosquitto.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/nixos/tests/mosquitto.nix b/nixos/tests/mosquitto.nix
index e29bd559ed9..1a534184066 100644
--- a/nixos/tests/mosquitto.nix
+++ b/nixos/tests/mosquitto.nix
@@ -19,16 +19,18 @@ in {
     server = { pkgs, ... }: {
       networking.firewall.allowedTCPPorts = [ port ];
       services.mosquitto = {
-        inherit port;
         enable = true;
-        host = "0.0.0.0";
-        checkPasswords = true;
-        users.${username} = {
-          inherit password;
-          acl = [
-            "topic readwrite ${topic}"
-          ];
-        };
+        listeners = [
+          {
+            inherit port;
+            users.${username} = {
+              inherit password;
+              acl = [
+                "readwrite ${topic}"
+              ];
+            };
+          }
+        ];
       };
 
       # disable private /tmp for this test