add mqtt host
This commit is contained in:
parent
8256ba38c4
commit
b16ceb22ee
3 changed files with 85 additions and 0 deletions
36
hosts/mqtt/mosquitto.nix
Normal file
36
hosts/mqtt/mosquitto.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.mosquitto = {
|
||||
enable = true;
|
||||
listeners = [
|
||||
{
|
||||
port = 1883;
|
||||
settings = {
|
||||
ptotocol = "mqtt";
|
||||
};
|
||||
}
|
||||
{
|
||||
port = 8083;
|
||||
settings = {
|
||||
protocol = "websockets";
|
||||
};
|
||||
}
|
||||
];
|
||||
settings = {
|
||||
allow_zero_length_clientid = true;
|
||||
autosave_interval = 1800;
|
||||
autosave_on_changes = true;
|
||||
connection_messages = true;
|
||||
allow_anonymous = true;
|
||||
};
|
||||
logDest = "stdout";
|
||||
logType = [
|
||||
"error"
|
||||
"warning"
|
||||
"notice"
|
||||
"information"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue