Skip to content

Commit

Permalink
nixos/doc: document mkDefault's defaultPriority
Browse files Browse the repository at this point in the history
  • Loading branch information
Atemu committed Nov 1, 2024
1 parent b2e2f48 commit 73fac16
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nixos/doc/manual/development/option-declarations.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ The function `mkOption` accepts the following arguments.
a plain English description in [Nixpkgs-flavored Markdown](
https://nixos.org/nixpkgs/manual/#sec-contributing-markup) format.

`defaultPriority`

: The priority applied to the default value when merging. The conventional
priorities are available in `lib.modules.priorities`, e.g.
`lib.modules.priorities.force` as in `lib.mkForce`. This is most useful to
make the values set in `config` merge with the option's default value rather
than overriding it by setting `defaultPriority =
lib.modules.priorities.baseline;` but any priority may be passed.

`example`

: An example value that will be shown in the NixOS manual.
Expand Down

0 comments on commit 73fac16

Please sign in to comment.