add mosquitto
This commit is contained in:
14
modules/services/mosquitto.nix
Normal file
14
modules/services/mosquitto.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user