tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
hostapd module: use enum
Eric Sagnes
9 years ago
fb26d561
9513ab45
+1
-4
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
networking
hostapd.nix
+1
-4
nixos/modules/services/networking/hostapd.nix
···
86
86
87
87
hwMode = mkOption {
88
88
default = "g";
89
89
-
type = types.string;
89
89
+
type = types.enum [ "a" "b" "g" ];
90
90
description = ''
91
91
Operation mode.
92
92
(a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g).
···
152
152
config = mkIf cfg.enable {
153
153
154
154
assertions = [
155
155
-
{ assertion = (cfg.hwMode == "a" || cfg.hwMode == "b" || cfg.hwMode == "g");
156
156
-
message = "hwMode must be a/b/g";
157
157
-
}
158
155
{ assertion = (cfg.channel >= 1 && cfg.channel <= 13);
159
156
message = "channel must be between 1 and 13";
160
157
}];