more config.wireless options

This commit is contained in:
Jeeves 2024-07-30 00:03:42 -06:00
parent 7699cea553
commit e76904f6af
2 changed files with 57 additions and 2 deletions

View file

@ -11,7 +11,7 @@
in rec {
utils = (import ./utils.nix) pkgs;
config = utils.buildConfig ./config.nix;
config = utils.buildConfig ~/.config/nixwrt/config.nix;
out = pkgs.stdenvNoCC.mkDerivation {
name = "openwrt";

View file

@ -249,18 +249,73 @@ in {
wireless = pkgs.lib.concatStrings [
(mkSections "wifi-device" config.wireless [
(typeString (mkOptional "type"))
(typeString (mkOptional "phy"))
(typeString (mkOptional "macaddr"))
(typeString (mkOptional "path"))
(typeBool (mkOptional "disabled"))
(typeInt (mkOptional "channel"))
# (typeList (mkOptional "channels"))
(typeString (mkOptional "hwmode"))
(typeString (mkOptional "band"))
(typeString (mkOptional "htmode"))
(typeBool (mkOptional "disabled"))
(typeInt (mkOptional "chanbw"))
(typeString (mkOptional "ht_capab"))
(typeInt (mkOptional "txpower"))
(typeBool (mkOptional "diversity"))
(typeInt (mkOptional "rxantenna"))
(typeInt (mkOptional "txantenna"))
(typeString (mkOptional "country"))
(typeBool (mkOptional "country_ie"))
(typeString (mkOptional "distance"))
(typeInt (mkOptional "beacon_int"))
(typeBool (mkOptional "legacy_rates"))
(typeString (mkOptional "require_mode"))
(typeInt (mkOptional "cell_density"))
# (typeList (mkOptional "basic_rate"))
# (typeList (mkOptional "supported_rates"))
(typeInt (mkOptional "log_level"))
(typeList (mkOptional "hostapd_options"))
])
(mkSections "wifi-iface" config.wireless [
(typeString (mkOptional "ifname"))
(typeString (mkOptional "device"))
(typeString (mkOptional "network"))
(typeString (mkOptional "mode"))
(typeBool (mkOptional "disabled"))
(typeString (mkOptional "ssid"))
(typeString (mkOptional "bssid"))
(typeString (mkOptional "mesh_id"))
(typeBool (mkOptional "hidden"))
(typeBool (mkOptional "isolate"))
(typeBool (mkOptional "doth"))
(typeBool (mkOptional "wmm"))
(typeString (mkOptional "encryption"))
(typeString (mkOptional "key"))
(typeString (mkOptional "key1"))
(typeString (mkOptional "key2"))
(typeString (mkOptional "key3"))
(typeString (mkOptional "key4"))
(typeString (mkOptional "macfilter"))
(typeString (mkOptional "iapp_interface"))
(typeBool (mkOptional "rsn_preauth"))
(typeInt (mkOptional "ieee80211w"))
(typeInt (mkOptional "ieee80211w_max_timeout"))
(typeInt (mkOptional "ieee80211w_retry_timeout"))
(typeBool (mkOptional "sae_require_mfp"))
(typeInt (mkOptional "maxassoc"))
(typeString (mkOptional "macaddr"))
(typeInt (mkOptional "dtim_period"))
(typeBool (mkOptional "short_preamble"))
(typeInt (mkOptional "max_listen_int"))
(typeInt (mkOptional "mcast_rate"))
(typeBool (mkOptional "wds"))
(typeString (mkOptional "owe_transition_ssid"))
(typeString (mkOptional "owe_transition_bssid"))
(typeInt (mkOptional "sae_pwe"))
(typeInt (mkOptional "ocv"))
(typeBool (mkOptional "start_disabled"))
(typeBool (mkOptional "default_disabled"))
(typeList (mkOptional "hostapd_bss_options"))
])
];
uhttpd = pkgs.lib.concatStrings [