mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
chore: tested hostapd wpa2 and wpa3-transition modes
This commit is contained in:
parent
32f1474d3f
commit
8545dff4e7
1 changed files with 7 additions and 2 deletions
|
@ -23,6 +23,7 @@
|
|||
optional
|
||||
optionals
|
||||
optionalString
|
||||
stringLength
|
||||
toLower
|
||||
types
|
||||
;
|
||||
|
@ -851,7 +852,7 @@ in {
|
|||
|
||||
wifi7 = {
|
||||
enable = mkOption {
|
||||
# FIXME: Change this to true once WiFi 7 is stable
|
||||
# FIXME: Change this to true once WiFi 7 is stable and hostapd is built with CONFIG_IEEE80211BE by default
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = mdDoc ''
|
||||
|
@ -921,6 +922,10 @@ in {
|
|||
assertion = countWpaPasswordDefinitions <= 1;
|
||||
message = ''hostapd interface ${interface} must use at most one WPA password option (wpaPassword, wpaPasswordFile, wpaPskFile)'';
|
||||
}
|
||||
{
|
||||
assertion = ifcfg.authentication.wpaPassword != null -> (stringLength ifcfg.authentication.wpaPassword >= 8 && stringLength ifcfg.authentication.wpaPassword <= 63);
|
||||
message = ''hostapd interface ${interface} uses a wpaPassword of invalid length (must be in [8,63]).'';
|
||||
}
|
||||
{
|
||||
assertion = ifcfg.authentication.saePasswords == [] || ifcfg.authentication.saePasswordsFile == null;
|
||||
message = ''hostapd interface ${interface} must use only one SAE password option (saePasswords or saePasswordsFile)'';
|
||||
|
@ -945,7 +950,7 @@ in {
|
|||
services.udev.packages = optionals (any (i: i.countryCode != null) (attrValues cfg.interfaces)) [pkgs.crda];
|
||||
|
||||
systemd.services.hostapd = {
|
||||
description = "Hostapd IEEE 802.11 AP";
|
||||
description = "Hostapd IEEE 802.11 AP Daemon";
|
||||
|
||||
path = [pkgs.hostapd];
|
||||
after = mapAttrsToList (interface: _: "sys-subsystem-net-devices-${utils.escapeSystemdPath interface}.device") cfg.interfaces;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue