modules/usteer: init
This adds the usteer daemon service for Liminix. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
be143d1a13
commit
27635fbe92
2 changed files with 44 additions and 0 deletions
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}
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue