nixos/winbox: init

This commit is contained in:
Pol Dellaiera 2023-12-15 19:48:49 +01:00
parent 0a2b91cdab
commit 700959c8ee
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA
2 changed files with 24 additions and 0 deletions

View File

@ -278,6 +278,7 @@
./programs/wayland/waybar.nix
./programs/wayland/wayfire.nix
./programs/weylus.nix
./programs/winbox.nix
./programs/wireshark.nix
./programs/xastir.nix
./programs/wshowkeys.nix

View File

@ -0,0 +1,23 @@
{ 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 {
networking.firewall.allowedUDPPorts = lib.optionals cfg.openFirewall [ 5678 ];
};
}