-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhostapd.nix
More file actions
48 lines (40 loc) · 1.27 KB
/
Copy pathhostapd.nix
File metadata and controls
48 lines (40 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ inputs, config, pkgs, ... }:
with inputs;
{
# Use unstable post-23.05 hostapd module.
disabledModules = [ "${nixpkgs}/nixos/modules/services/networking/hostapd.nix" ];
imports = [ "${nixpkgs-unstable}/nixos/modules/services/networking/hostapd.nix" ];
services.hostapd = {
enable = true;
# unstable post-23.05 hostapd has OCV
package = pkgs.pkgsUnstable.hostapd;
radios.wlp4s0 = {
countryCode = "KR";
band = "5g";
channel = 100;
wifi4 = {
enable = true;
capabilities = [ "LDPC" "HT40+" "HT40-" "SHORT-GI-20" "SHORT-GI-40" "TX-STBC" "RX-STBC1" "MAX-AMSDU-7935" "DSSS_CCK-40" ];
};
wifi5 = {
enable = true;
capabilities = [ "MAX-MPDU-11454" "RXLDPC" "SHORT-GI-80" "TX-STBC-2BY1" "MAX-A-MPDU-LEN-EXP3" "RX-ANTENNA-PATTERN" "TX-ANTENNA-PATTERN" ];
operatingChannelWidth = "80";
};
settings = {
bridge = "br-lan";
beacon_prot = true;
ocv = true;
okc = true;
vht_oper_centr_freq_seg0_idx = config.services.hostapd.radios.wlp4s0.channel + 6;
};
networks = {
wlp4s0 = {
ssid = "alruba";
apIsolate = true;
authentication.saePasswordsFile = "/secrets/wpa-passwords";
};
};
};
};
}