3 NixOS is a Linux distribution based on the purely functional package
4 management system Nix. More information can be found at
5 https://nixos.org/nixos and in the manual in doc/manual.
9 You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
13 - Make sure you read about the [commit conventions](../CONTRIBUTING.md#commit-conventions) common to Nixpkgs as a whole.
15 - Format the commit messages in the following way:
18 nixos/(module): (init module | add setting | refactor | etc)
20 (Motivation for change. Link to release notes. Additional information.)
25 * nixos/hydra: add bazBaz option
27 Dual baz behavior is needed to do foo.
28 * nixos/nginx: refactor config generation
30 The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
32 ## Reviewing contributions
34 When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people’s installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra.
38 Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
42 - Ensure that the module maintainers are notified.
43 - [CODEOWNERS](https://help.github.com/articles/about-codeowners/) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
44 - Ensure that the module tests, if any, are succeeding.
45 - You may invoke OfBorg with `@ofborg test <module>` to build `nixosTests.<module>`
46 - Ensure that the introduced options are correct.
47 - Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
48 - Description, default and example should be provided.
49 - Ensure that option changes are backward compatible.
50 - `mkRenamedOptionModuleWith` provides a way to make renamed option backward compatible.
51 - Use `lib.versionAtLeast config.system.stateVersion "23.11"` on backward incompatible changes which may corrupt, change or update the state stored on existing setups.
52 - Ensure that removed options are declared with `mkRemovedOptionModule`.
53 - Ensure that changes that are not backward compatible are mentioned in release notes.
54 - Ensure that documentations affected by the change is updated.
56 Sample template for a module update review is provided below.
61 - [ ] changes are backward compatible
62 - [ ] removed options are declared with `mkRemovedOptionModule`
63 - [ ] changes that are not backward compatible are documented in release notes
64 - [ ] module tests succeed on ARCHITECTURE
65 - [ ] options types are appropriate
66 - [ ] options description is set
67 - [ ] options example is provided
68 - [ ] documentation affected by the changes is updated
70 ##### Possible improvements
77 New modules submissions introduce a new module to NixOS.
81 - Ensure that all file paths [fit the guidelines](../CONTRIBUTING.md#file-naming-and-organisation).
82 - Ensure that the module tests, if any, are succeeding.
83 - Ensure that the introduced options are correct.
84 - Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
85 - Description, default and example should be provided.
86 - Ensure that module `meta` field is present
87 - Maintainers should be declared in `meta.maintainers`.
88 - Module documentation should be declared with `meta.doc`.
89 - Ensure that the module respect other modules functionality.
90 - For example, enabling a module should not open firewall ports by default.
92 Sample template for a new module review is provided below.
97 - [ ] module path fits the guidelines
98 - [ ] module tests succeed on ARCHITECTURE
99 - [ ] options have appropriate types
100 - [ ] options have default
101 - [ ] options have example
102 - [ ] options have descriptions
103 - [ ] No unneeded package is added to `environment.systemPackages`
104 - [ ] `meta.maintainers` is set
105 - [ ] module documentation is declared in `meta.doc`
107 ##### Possible improvements