From c08d6c464f7c34865a8e5d06bc252c582b253157 Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Sun, 8 Sep 2024 00:47:05 +0200 Subject: [PATCH] feat(ap01): re-enable 2GHz Signed-off-by: Ryan Lahfa --- machines/ap01/_configuration.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/machines/ap01/_configuration.nix b/machines/ap01/_configuration.nix index 37fed3a..edb1e16 100644 --- a/machines/ap01/_configuration.nix +++ b/machines/ap01/_configuration.nix @@ -9,13 +9,11 @@ let inherit (pkgs.pseudofile) symlink dir; inherit (pkgs) serviceFns; svc = config.system.service; - # secrets-1 = { - # ssid = "DGNum 2G prototype (N)"; - # # wpa_passphrase = "diamond dogs"; - # }; + secrets-1 = { + ssid = "DGNum 2G prototype (N)"; + }; secrets-2 = { ssid = "DGNum 5G prototype (AX)"; - # wpa_passphrase = "diamond dogs"; }; baseParams = { country_code = "FR"; @@ -121,6 +119,11 @@ rec { primary = services.int; members = { lan.member = config.hardware.networkInterfaces.lan; + wlan0 = { + member = config.hardware.networkInterfaces.wlan0; + # Bridge only once hostapd is ready. + dependencies = [ config.services.hostap-1-ready ]; + }; wlan1 = { member = config.hardware.networkInterfaces.wlan1; # Bridge only once hostapd is ready. @@ -198,9 +201,12 @@ rec { }; # wlan0 is the 2.4GHz interface. - # services.hostap-1 = mkWifiSta ( - # baseParams // radiusKeyMgmt - # ) config.hardware.networkInterfaces.wlan0 secrets-1; + services.hostap-1 = mkWifiSta ( + baseParams // radiusKeyMgmt + ) config.hardware.networkInterfaces.wlan0 secrets-1; + services.hostap-1-ready = svc.hostapd-ready.build { + interface = config.hardware.networkInterfaces.wlan0; + }; # wlan1 is the 5GHz interface, e.g. AX capable. services.hostap-2 = mkWifiSta ( baseParams // clientRadius // externalRadius // radiusKeyMgmt // modernParams