mkEnableOption
lib.options.mkEnableOption
Docs pulled from | This Revision | 10 minutes ago
Creates an Option attribute set for a boolean value option i.e an option to be toggled on or off:
Inputs
name
-
Name for the created option
Examples
mkEnableOption
usage example
mkEnableOption "foo"
=> { _type = "option"; default = false; description = "Whether to enable foo."; example = true; type = { ... }; }
Noogle detected
Implementation
The following is the current implementation of this function.
mkEnableOption =
# Name for the created option
name: mkOption {
default = false;
example = true;
description = "Whether to enable ${name}.";
type = lib.types.bool;
};