Add mqtt service to magnesium
This commit is contained in:
parent
b8d65c9b23
commit
4774155e81
2 changed files with 16 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./coturn.nix
|
./coturn.nix
|
||||||
|
./mosquitto.nix
|
||||||
./public-ip-tunnel.nix
|
./public-ip-tunnel.nix
|
||||||
./webserver.nix
|
./webserver.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
15
hosts/magnesium/services/mosquitto.nix
Normal file
15
hosts/magnesium/services/mosquitto.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let port = 1883;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.mosquitto = {
|
||||||
|
enable = true;
|
||||||
|
persistence = true;
|
||||||
|
listeners = [
|
||||||
|
{
|
||||||
|
port = port;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ port ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue