summary refs log tree commit diff
path: root/pkgs/lib/options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib/options.nix')
-rw-r--r--pkgs/lib/options.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix
index 1fdf9ad8088..5c896d5714c 100644
--- a/pkgs/lib/options.nix
+++ b/pkgs/lib/options.nix
@@ -28,6 +28,13 @@ rec {
     # extraConfigs (list of possible configurations)
   };
 
+  mkEnableOption = name: mkOption {
+    default = false;
+    example = true;
+    description = "Whether to enable ${name}";
+    type = lib.types.bool;
+  };
+
   mapSubOptions = f: opt:
     if opt ? options then
       opt // {