summary refs log tree commit diff
path: root/nixos
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
parent80b854739c57debee887aaf4efa9fb113916ae49 (diff)
downloadnixlib-ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4.tar
nixlib-ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4.tar.gz
nixlib-ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4.tar.bz2
nixlib-ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4.tar.lz
nixlib-ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4.tar.xz
nixlib-ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4.tar.zst
nixlib-ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4.zip
network-interfaces module: use enum
Diffstat (limited to 'nixos')
-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.