Permalink
Browse files

Merge pull request #27131 from richardlarocque/mosquitto_pw

mosquitto: Explicitly configure password file
  • Loading branch information...
joachifm committed Jan 13, 2018
2 parents 5f8bb3f + 66b07e4 commit ed250d809359a21cbc13255c3ee3861ce695bce1
Showing with 14 additions and 0 deletions.
  1. +14 −0 nixos/modules/services/networking/mosquitto.nix
@@ -12,13 +12,18 @@ let
keyfile ${cfg.ssl.keyfile}
'';
passwordConf = optionalString cfg.checkPasswords ''
password_file ${cfg.dataDir}/passwd
'';
mosquittoConf = pkgs.writeText "mosquitto.conf" ''
pid_file /run/mosquitto/pid
acl_file ${aclFile}
persistence true
allow_anonymous ${boolToString cfg.allowAnonymous}
bind_address ${cfg.host}
port ${toString cfg.port}
${passwordConf}
${listenerConf}
${cfg.extraConf}
'';
@@ -153,6 +158,15 @@ in
'';
};
checkPasswords = mkOption {
default = false;
example = true;
type = types.bool;
description = ''
Refuse connection when clients provide incorrect passwords.
'';
};
extraConf = mkOption {
default = "";
type = types.lines;

0 comments on commit ed250d8

Please sign in to comment.