lib: add RFC-145 nixdoc comments to extended library functions

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I41c4b2cb70512699a044578fa88eb8266a6a6964
This commit is contained in:
raf 2026-05-20 17:02:36 +03:00
commit a17f043605
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
7 changed files with 506 additions and 19 deletions

View file

@ -5,6 +5,27 @@
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.lists) flatten;
in {
/**
Build a boolean NixOS option with the given default value and description.
# Type
```
mkBool :: Bool -> String -> Option
```
# Arguments
- `value`: Default boolean value for the option.
- `description`: Documentation string for the option.
# Example
```nix
mkBool true "Enable feature X"
=> mkOption { type = bool; default = true; description = "Enable feature X"; }
```
*/
mkBool = value: description:
mkOption {
type = bool;