nixpkgs/nixos/modules/programs/winbox.nix
Wolfgang Walther 5cbdb94f3a
treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.

(cherry picked from commit 91a8fee3aa)
2025-10-05 12:59:25 +02:00

30 lines
634 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.winbox;
in
{
options.programs.winbox = {
enable = lib.mkEnableOption "MikroTik Winbox";
package = lib.mkPackageOption pkgs "winbox" { };
openFirewall = lib.mkOption {
description = ''
Whether to open ports for the MikroTik Neighbor Discovery protocol. Required for Winbox neighbor discovery.
'';
default = false;
type = lib.types.bool;
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
networking.firewall.allowedUDPPorts = lib.optionals cfg.openFirewall [ 5678 ];
};
}