@@ -14,14 +14,11 @@ necessarily) before you start developing.
1414
1515## Adding Documentation {#sec-guidelines-documentation}
1616
17- Most, if not all, changes warrant changes to the documentation. Module options
18- should be documented with
19- [ Nixpkgs-flavoured Markdown] ( https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-markup ) ,
20- albeit with exceptions.
17+ [ Nixpkgs Flavoured Markdown ] : https://github.com/NixOS/nixpkgs/blob/master/doc/README.md#syntax
2118
22- ::: {.note} As of ** v0.5 ** , ** nvf ** is itself documented using full markdown in
23- both module options and the manual. With ** v0.6 ** , this manual has also been
24- converted to markdown in full. :::
19+ Almost all changes warrant updates to the documentation: at the very least, you
20+ must update the changelog. Both the manual and module options use
21+ [ Nixpkgs Flavoured Markdown ] .
2522
2623The HTML version of this manual containing both the module option descriptions
2724and the documentation of ** nvf** (such as this page) can be generated and opened
@@ -117,10 +114,11 @@ applies to string literals and module descriptions and documentation.
117114
118115### Nix {#sec-code-style-nix}
119116
120- ** nvf** is formatted by the
121- [ alejandra] ( https://github.com/kamadorueda/alejandra ) tool and the formatting is
122- checked in the pull request and push workflows. Run the ` nix fmt ` command inside
123- the project repository before submitting your pull request.
117+ [ alejandra ] : https://github.com/kamadorueda/alejandra
118+
119+ ** nvf** is formatted by the [ alejandra] tool and the formatting is checked in
120+ the pull request and push workflows. Run the ` nix fmt ` command inside the
121+ project repository before submitting your pull request.
124122
125123While Alejandra is mostly opinionated on how code looks after formatting,
126124certain changes are done at the user's discretion based on how the original code
@@ -138,10 +136,14 @@ module = {
138136 # same as parent modules, unfold submodules
139137 subModule = {
140138 # this is an option that contains more than one nested value
139+ # Note: try to be careful about the ordering of `mkOption` arguments.
140+ # General rule of thumb is to order from least to most likely to change.
141+ # This is, for most cases, type < default < description.
142+ # Example, if present, would be between default and description
141143 someOtherValue = mkOption {
142144 type = lib.types.bool;
143- description = "Some other description";
144145 default = true;
146+ description = "Some other description";
145147 };
146148 };
147149}
0 commit comments