Add mqtt service to magnesium

This commit is contained in:
Jakob Lechner 2023-07-10 21:51:27 +00:00
parent 7a8c0fc768
commit 7ce95063c8
No known key found for this signature in database
GPG key ID: 996082EFB5906C10
2 changed files with 16 additions and 0 deletions

View file

@ -1,6 +1,7 @@
{
imports = [
./coturn.nix
./mosquitto.nix
./public-ip-tunnel.nix
./webserver.nix
];

View 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 ];
}