Files
nixos/modules/services/mosquitto.nix
Joakim Repomaa 8586351606 add mosquitto
2025-03-30 20:09:02 +03:00

15 lines
318 B
Nix

{ config, lib, ... }:
let
cfg = config.services.mosquitto;
in
{
options = {
services.mosquitto = {
openFirewall = lib.mkEnableOption "Open firewall port for Mosquitto";
};
};
config = lib.mkIf cfg.enable {
networking.firewall.allowedTCPPorts = map ({ port, ... }: port) cfg.listeners;
};
}