mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
nixos/winbox: init
This commit is contained in:
parent
0a2b91cdab
commit
700959c8ee
@ -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
|
||||
|
23
nixos/modules/programs/winbox.nix
Normal file
23
nixos/modules/programs/winbox.nix
Normal 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 ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user