summary refs log tree commit diff
path: root/pkgs/lib
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib')
-rw-r--r--pkgs/lib/types.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix
index 8b0f61549b5d..01a5d98fca62 100644
--- a/pkgs/lib/types.nix
+++ b/pkgs/lib/types.nix
@@ -110,6 +110,12 @@ rec {
           throw "Multiple definitions. Only one is allowed for this option.";
     };
 
+    none = elemType: mkOptionType {
+      inherit (elemType) name check iter fold docPath hasOptions;
+      merge = list:
+        throw "No definitions are allowed for this option.";
+    };
+
     nullOr = elemType: mkOptionType {
       inherit (elemType) name merge docPath hasOptions;
       check = x: builtins.isNull x || elemType.check x;