usteer: multi-AP steering #10
5 changed files with 88 additions and 0 deletions
|
@ -87,6 +87,8 @@ in rec {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.usteer = svc.usteer.build { interface = services.int; };
|
||||||
|
|
||||||
services.dhcpv4 =
|
services.dhcpv4 =
|
||||||
let iface = services.int;
|
let iface = services.int;
|
||||||
in svc.network.dhcp.client.build { interface = iface; };
|
in svc.network.dhcp.client.build { interface = iface; };
|
||||||
|
|
26
modules/usteer/default.nix
Normal file
26
modules/usteer/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
## usteer
|
||||||
|
## ==============
|
||||||
|
##
|
||||||
|
## usteer is a band-steering daemon for hostapd.
|
||||||
|
## this helps you optimize the roaming behavior of wireless clients (STAs) in an ESS
|
||||||
|
## consisting of multiple BSS / APs.
|
||||||
|
## you want this as soon as you are deploying Liminix on >1 APs that are close to each other.
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption types;
|
||||||
|
inherit (pkgs) liminix;
|
||||||
|
in {
|
||||||
|
options.system.service.usteer = mkOption {
|
||||||
|
type = liminix.lib.types.serviceDefn;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
system.service.usteer = pkgs.liminix.callService ./usteer.nix {
|
||||||
|
ifname = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "interface name on which to connect to other usteer instances";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
18
modules/usteer/usteer.nix
Normal file
18
modules/usteer/usteer.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
liminix
|
||||||
|
, lib
|
||||||
|
, usteer
|
||||||
|
}:
|
||||||
|
{ ifname }:
|
||||||
|
let
|
||||||
|
inherit (liminix.services) longrun;
|
||||||
|
name = "usteerd";
|
||||||
|
in
|
||||||
|
longrun {
|
||||||
|
# Does it need to be unique?
|
||||||
|
inherit name;
|
||||||
|
run = ''
|
||||||
|
mkdir -p /run/usteerd
|
||||||
|
${usteer}/bin/usteerd -s -v -i ${ifname}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -113,6 +113,7 @@ in {
|
||||||
libubox = callPackage ./libubox {};
|
libubox = callPackage ./libubox {};
|
||||||
ubus = callPackage ./ubus {};
|
ubus = callPackage ./ubus {};
|
||||||
iwinfo = callPackage ./iwinfo {};
|
iwinfo = callPackage ./iwinfo {};
|
||||||
|
usteer = callPackage ./usteer {};
|
||||||
uevent-watch = callPackage ./uevent-watch {};
|
uevent-watch = callPackage ./uevent-watch {};
|
||||||
usb-modeswitch = callPackage ./usb-modeswitch {};
|
usb-modeswitch = callPackage ./usb-modeswitch {};
|
||||||
writeAshScript = callPackage ./write-ash-script {};
|
writeAshScript = callPackage ./write-ash-script {};
|
||||||
|
|
41
pkgs/usteer/default.nix
Normal file
41
pkgs/usteer/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
cmake,
|
||||||
|
json_c,
|
||||||
|
libpcap,
|
||||||
|
libubox,
|
||||||
|
ubus,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "usteer";
|
||||||
|
version = "unstable-04-09-2024";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "openwrt";
|
||||||
|
repo = "usteer";
|
||||||
|
rev = "e218150979b40a1b3c59ad0aaa3bbb943814db1e";
|
||||||
|
hash = "sha256-shbN5Wp7m/olr0OcckcPk11yXnJxpnllXqi/bw+X7gM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace CMakeLists.txt \
|
||||||
|
--replace-fail "/usr" "${placeholder "out"}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ ubus libpcap libubox json_c ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "";
|
||||||
|
homepage = "https://github.com/openwrt/usteer";
|
||||||
|
maintainers = with lib.maintainers; [ raitobezarius ];
|
||||||
|
mainProgram = "usteer";
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue