mkEnableOption
lib.mkEnableOption
Docs pulled from | This Revision | about 1 hour ago
Creates an option declaration with a default value of ´false´, and can be defined to ´true´.
Inputs
name
-
Name for the created option
Examples
lib.options.mkEnableOption
usage example
# module
let
eval = lib.evalModules {
modules = [
{
options.foo.enable = mkEnableOption "foo";
config.foo.enable = true;
}
]:
}
in
eval.config
=> { foo.enable = true; }
Noogle detected
Implementation
The following is the current implementation of this function.
mkEnableOption =
name:
mkOption {
default = false;
example = true;
description = "Whether to enable ${name}.";
type = lib.types.bool;
};