1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 00:18:30 +02:00

contributing: add basic style guidelines

In particular, refer to the Nixpkgs guidelines and add a note about
attribute names referencing packages in Nixpkgs.
This commit is contained in:
Robert Helgesson 2017-11-14 21:22:34 +01:00
parent a36989a860
commit 130e33a4e7
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86

View File

@ -68,6 +68,15 @@ description if you wish.
In addition to the above commit message guidelines, try to follow the
[seven rules][] as much as possible.
### Style guidelines ###
The code in Home Manager should follow the [Nixpkgs syntax
guidelines][]. Note, we prefer `lowerCamelCase` for variable and
attribute names with the accepted exception of variables directly
referencing packages in Nixpkgs which use a hyphenated style. For
example, the Home Manager option `services.gpg-agent.enableSshSupport`
references the `gpg-agent` package in Nixpkgs.
### News ###
Home Manager includes a system for presenting news to the user. When
@ -125,3 +134,4 @@ If you do have a change worthy of a news entry then please add one in
[create a pull request]: https://help.github.com/articles/creating-a-pull-request/
[seven rules]: https://chris.beams.io/posts/git-commit/#seven-rules
[`news.nix`]: https://github.com/rycee/home-manager/blob/master/modules/misc/news.nix
[Nixpkgs syntax guidelines]: https://nixos.org/nixpkgs/manual/#sec-syntax