mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
helpers: add a helper for creating options
This commit is contained in:
parent
a9402c953a
commit
43ce0d77db
1 changed files with 7 additions and 0 deletions
|
@ -51,4 +51,11 @@ rec {
|
||||||
key = key;
|
key = key;
|
||||||
mode = mode;
|
mode = mode;
|
||||||
}) normalized);
|
}) normalized);
|
||||||
|
|
||||||
|
# Creates an option with a nullable type that defaults to null.
|
||||||
|
nullOrOption = type: desc: lib.mkOption {
|
||||||
|
type = lib.types.nullOr type;
|
||||||
|
default = null;
|
||||||
|
description = desc;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue