mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
lib/options: Add mkEnabledOption
Like `lib.options.mkEnableOption` but it's enabled by default
This commit is contained in:
parent
7f2601adc1
commit
56e8230939
1 changed files with 10 additions and 0 deletions
|
@ -64,6 +64,16 @@ in
|
|||
rec {
|
||||
inherit pluginDefaultText;
|
||||
|
||||
# Create an option declaration with a default value of `true`, and can be defined to `false`.
|
||||
mkEnabledOption =
|
||||
name:
|
||||
lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
description = "Whether to enable ${name}.";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
# Creates an option with a nullable type that defaults to null.
|
||||
mkNullOrOption' =
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue