lib: cleanup; move mkBool to modules as mkBoolOption

This commit is contained in:
raf 2024-02-19 13:09:11 +03:00
commit 4eb26c0d98
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
4 changed files with 14 additions and 26 deletions

13
lib/modules.nix Normal file
View 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;
};
}