mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-02 09:05:55 +00:00
lib: cleanup; move mkBool to modules as mkBoolOption
This commit is contained in:
parent
f7fca7fb9c
commit
4eb26c0d98
4 changed files with 14 additions and 26 deletions
|
|
@ -1,8 +0,0 @@
|
|||
{lib}: {
|
||||
mkBool = value: description:
|
||||
lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = value;
|
||||
inherit description;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{lib}: {
|
||||
bool = import ./bool.nix {inherit lib;};
|
||||
modules = import ./modules.nix {inherit lib;};
|
||||
dag = import ./dag.nix {inherit lib;};
|
||||
types = import ./types {inherit lib;};
|
||||
languages = import ./languages.nix {inherit lib;};
|
||||
|
|
|
|||
13
lib/modules.nix
Normal file
13
lib/modules.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{lib}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) bool;
|
||||
in {
|
||||
# mkBoolOption: bool -> string -> option
|
||||
# e.g. mkBoolOption true "Enable feature X"
|
||||
mkBoolOption = value: description:
|
||||
mkOption {
|
||||
type = bool;
|
||||
default = value;
|
||||
inherit description;
|
||||
};
|
||||
}
|
||||
17
lib/nmd.nix
17
lib/nmd.nix
|
|
@ -1,17 +0,0 @@
|
|||
# Copied from nmd master: https://gitlab.com/rycee/nmd/-/blob/master/default.nix?ref_type=heads
|
||||
# Allows asciiDoc in options. It is easier to copy & keep updated then figure out how to pass the nmd input
|
||||
# along to user modules
|
||||
{
|
||||
# Indicates that the given text should be interpreted as AsciiDoc markup.
|
||||
asciiDoc = text: {
|
||||
_type = "asciiDoc";
|
||||
inherit text;
|
||||
};
|
||||
|
||||
# Indicates that the given text should be interpreted as AsciiDoc markup and
|
||||
# used in a literal context.
|
||||
literalAsciiDoc = text: {
|
||||
_type = "literalAsciiDoc";
|
||||
inherit text;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue