network-interfaces module: use enum

This commit is contained in:
Eric Sagnes 2016-11-04 13:05:44 +09:00
parent 80b854739c
commit ffc0e2f4fc

View file

@ -245,7 +245,7 @@ let
virtualType = mkOption {
default = null;
type = types.nullOr (types.addCheck types.str (v: v == "tun" || v == "tap"));
type = with types; nullOr (enum [ "tun" "tap" ]);
description = ''
The explicit type of interface to create. Accepts tun or tap strings.
Also accepts null to implicitly detect the type of device.