This convention is inspired by the Conventional Commits specification.
The following types are used to categorize commits:
pkgs
: Changes to package definitions or versions, adding and removing packagesfix
: Bug fixes, including configuration-related fixesfeat
: New features or functionality, including new configuration optionsdocs
: Changes to documentationrefactor
: Changes that improve the internal structure or organization of the code/configurationchore
: Maintenance tasks that keep the configuration or codebase healthy, including routine configuration updates
Commits should follow the format:
[type]([module][@host]): [brief description]
[type]
: One of the above types[module]
: The name of the module or service affected by the change (e.g.networking
,security
,services.nginx
). If multiple modules are affected, list them separated by commas.[@host]
: An optional identifier for the host(s) the change applies to.[brief description]
: A brief summary of the change written in the imperative mood.
fix(networking@host): Fix DNS resolver configuration
pkgs(nixpkgs@host): Upgrade to NixOS 21.05
docs: Update README with new configuration instructions
refactor(config@host): Simplify networking configuration
chore(hosts/abc): xorg -> General DE config
fix(pkgs@host): Correct version of package 'foo' to resolve compatibility issue
refactor(security@host): Simplify firewall rules
chore: Clean up outdated comments in configuration files
- The
@host
identifier is optional. If it's specific to a host, use the host's identifier. refactor
andchore
are distinct types, withrefactor
implying a more significant change to the code/configuration, andchore
implying a more routine or maintenance-oriented task.- Renaming a file to better reflect its contents is an example of a
chore
commit. - Use the imperative mood for the brief description: "Update DNS resolver" instead of "Updated DNS resolver."
It is recommended to include references to related issues or tickets in the commit message, using the format #123
for GitHub issues.
- Use one of the defined types
- Specify the affected module
- Optionally include the host identifier
- Write a brief description in the imperative mood
- Reference related issues if applicable