summaryrefslogtreecommitdiffstats
path: root/nixos/modules/tasks/network-interfaces.nix
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-11-04 13:05:44 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-11-04 13:05:44 +0900
commitffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4 (patch)
tree87819bdeeae1e8604896f8667813bfadfcb779f1 /nixos/modules/tasks/network-interfaces.nix
parent80b854739c57debee887aaf4efa9fb113916ae49 (diff)
network-interfaces module: use enum
Diffstat (limited to 'nixos/modules/tasks/network-interfaces.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index aae4dc5fdadf..1faa8abd5f7f 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -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.