From e76904f6afac741c3d62e6c96799c4b71b2ac987 Mon Sep 17 00:00:00 2001 From: Jeeves Date: Tue, 30 Jul 2024 00:03:42 -0600 Subject: [PATCH] more config.wireless options --- flake.nix | 2 +- utils.nix | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 73cf5f4..7445234 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; diff --git a/utils.nix b/utils.nix index 470def4..666779b 100644 --- a/utils.nix +++ b/utils.nix @@ -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 [