From ffc0e2f4fc63f3a2d028dbd7d981223fb19cbeb4 Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Fri, 4 Nov 2016 13:05:44 +0900 Subject: [PATCH] network-interfaces module: use enum --- nixos/modules/tasks/network-interfaces.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.