query
On this page

mkEnableOption

lib.mkEnableOption

Docs pulled from | This Revision | 22 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 = { ... }; }
(lib.options.mkEnableOption)

Noogle detected

Aliases

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;
  };