Skip to content

Commit 24d6445

Browse files
committed
docs: add contributing guidelines
1 parent 8cbc741 commit 24d6445

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

CONTRIBUTING.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# CONTRIBUTING.md
2+
3+
This repo follows a modified version of [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
4+
applying the [nixpkgs's contributing guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md)
5+
on-top of it.
6+
7+
The following document explains the differences diverging from the standard format.
8+
9+
## Git formatting:
10+
11+
* The commit message **MUST** all be lowercased. The body of the commit has no such restriction.
12+
* **BREAKING CHANGE**: a commit that introduces a breaking API change (similar to *MAJOR* in Semantic Versioning) **MUST** include a footer in the style of `BREAKING CHANGE: <description>`.
13+
14+
```
15+
<pkg-name>: (<version> -> <version> | init at <version> | <type? feat> <reason>)
16+
<module-name>: <type? feat> <reason>
17+
host/<host-name>: <type? feat> <reason>
18+
<type>: <reason>
19+
```
20+
21+
Types:
22+
23+
* **type**: follows conventional commits, `fix`, `ci`, `docs`, `style`, `refactor`, `perf`, `test`, however its optional unless at the top level. Omitting type should be preferred, only add a type if it can explain the change on its own. If not, rephrase the reason to fit the pattern "feat: reason" or "docs: reason", depending on the commit style's default type.
24+
* **version**: typically semantic version of a package. Follows nixpkgs conventions.
25+
26+
Names:
27+
28+
* *pkg-name*: typically the name of the folder holding a `default.nix` file somewhere under the `packages/` folder.
29+
* *module-name*: typically the name of the `.nix` file in a `modules/` folder. Never apped the file type. This may also include per-host modules plus overlays and tests relating to supporting a module.
30+
* *host-name*: typically the name of the folder under `hosts/` folder.
31+
32+
33+
## Committing
34+
35+
We use pre-commit. You can check a commit without it using `nix flake check` but this is not recommended.

0 commit comments

Comments
 (0)