1 { config, lib, pkgs, ... }:
4 cfg = config.programs.winbox;
7 options.programs.winbox = {
8 enable = lib.mkEnableOption ("MikroTik Winbox");
9 package = lib.mkPackageOption pkgs "winbox" { };
11 openFirewall = lib.mkOption {
13 Whether to open ports for the MikroTik Neighbor Discovery protocol. Required for Winbox neighbor discovery.
16 type = lib.types.bool;
20 config = lib.mkIf cfg.enable {
21 environment.systemPackages = [ cfg.package ];
22 networking.firewall.allowedUDPPorts = lib.optionals cfg.openFirewall [ 5678 ];