lol

hostapd module: use enum

+1 -4
+1 -4
nixos/modules/services/networking/hostapd.nix
··· 86 86 87 87 hwMode = mkOption { 88 88 default = "g"; 89 - type = types.string; 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 - { assertion = (cfg.hwMode == "a" || cfg.hwMode == "b" || cfg.hwMode == "g"); 156 - message = "hwMode must be a/b/g"; 157 - } 158 155 { assertion = (cfg.channel >= 1 && cfg.channel <= 13); 159 156 message = "channel must be between 1 and 13"; 160 157 }];