From 4fc8af31c0273cb6b89460f9c145028d3e10f3a9 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Sat, 29 Nov 2025 19:39:22 +0100 Subject: [PATCH] docs/lib: use note/warning markup more consistently --- lib/attrsets.nix | 4 ++-- lib/generators.nix | 4 ++-- lib/options.nix | 8 ++++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/attrsets.nix b/lib/attrsets.nix index dfcb2d3186fe..b8a98de69971 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -715,10 +715,10 @@ rec { Iterates over every name-value pair in the given attribute set. The result of the callback function is often called `acc` for accumulator. It is passed between callbacks from left to right and the final `acc` is the return value of `foldlAttrs`. - Attention: - + ::: {.note} There is a completely different function `lib.foldAttrs` which has nothing to do with this function, despite the similar name. + ::: # Inputs diff --git a/lib/generators.nix b/lib/generators.nix index ed0cbd881813..613a83e25e5e 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -756,9 +756,9 @@ rec { * `indent` - initial indent. * `asBindings` - by default generate single value, but with this use attrset to set global vars. - Attention: - + ::: {.note} Regardless of multiline parameter there is no trailing newline. + ::: # Inputs diff --git a/lib/options.nix b/lib/options.nix index 99f47fe96b5d..a36fc2220d21 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -444,14 +444,18 @@ rec { /** Require a single definition. - WARNING: Does not perform nested checks, as this does not run the merge function! + ::: {.warning} + Does not perform nested checks, as this does not run the merge function! + ::: */ mergeOneOption = mergeUniqueOption { message = ""; }; /** Require a single definition. - NOTE: When the type is not checked completely by check, pass a merge function for further checking (of sub-attributes, etc). + ::: {.note} + When the type is not checked completely by check, pass a merge function for further checking (of sub-attributes, etc). + ::: # Inputs