diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 1faa8abd5f7..aaa78daeb3a 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -782,13 +782,12 @@ in
};
type = mkOption {
- type = types.string;
+ type = types.enum [ "managed" "ibss" "monitor" "mesh" "wds" ];
default = "managed";
example = "ibss";
description = ''
- The type of the WLAN interface. The type has to be either managed,
- ibss, monitor, mesh or wds.
- Also, the type has to be supported by the underlying hardware of the device.
+ The type of the WLAN interface.
+ The type has to be supported by the underlying hardware of the device.
'';
};
@@ -799,17 +798,11 @@ in
};
flags = mkOption {
- type = types.nullOr types.string;
+ type = with types; nullOr (enum [ "none" "fcsfail" "control" "otherbss" "cook" "active" ]);
default = null;
example = "control";
description = ''
- Flags for interface of type monitor. The valid flags are:
- none: no special flags
- fcsfail: show frames with FCS errors
- control: show control frames
- otherbss: show frames from other BSSes
- cook: use cooked mode
- active: use active mode (ACK incoming unicast packets)
+ Flags for interface of type monitor.
'';
};