Contributing: Difference between revisions

From NixOS Wiki
Layer-09 (talk | contribs)
I supplemented the page with more information, but it's still undergoing changes. I added a warning.
Klinger (talk | contribs)
m →‎2.4 Submitting edits: MoS link added
Tags: Mobile edit Mobile web edit
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{warning|This page is currently undergoing heavy changes. I will remove this warning after everything is completed.}}
It is possible to contribute to Nix(OS) in different ways:
* Contributing to Nix
* Contributing to the documentation
* [[Contributing#Contributing to the Official NixOS Wiki|Contributing to the Official NixOS Wiki]] (see below)
* [[Contributing#Contributing to Nixpkgs|Contributing to Nixpkgs]] (see below)


== Contributing to Nixpkgs ==
== Contributing to Nix ==
Contributing to Nixpkgs, the package repository for the Nix package manager, allows you to help maintain and improve the ecosystem of software available to Nix users. This guide outlines steps to get started with contributing to Nixpkgs effectively.


'''1.1 Getting Started'''
See the [https://github.com/NixOS/nix/blob/master/CONTRIBUTING.md Nix repository contribution guide].


Before you begin, familiarize yourself with how Nixpkgs is structured. The Nixpkgs manual provides detailed documentation on how packages are defined and managed.
== Contributing to the documentation ==
Reference documentation and learning materials for using Nix standalone are maintained on [https://nix.dev/ nix.dev] by the [https://github.com/nixos/nix.dev/tree/master/maintainers Nix documentation team].


'''1.2 Setting Up Your Development Environment'''
See [https://nix.dev/contributing/documentation Contributing Documentation] for how you can help.


To start contributing to Nixpkgs, ensure your development environment is properly configured:
== Contributing to the Official NixOS Wiki ==
Contributing to the official NixOS Wiki is an invaluable way to improve documentation, share knowledge, and support users in navigating the NixOS ecosystem. This guide provides clear steps to help you begin contributing effectively to the NixOS Wiki.


* Install Nix: Install Nix on your local machine if you haven't already. This allows you to build packages and test changes locally.
==== 2.1 Getting started ====
* Clone the Repository: Fork and clone the Nixpkgs repository from GitHub.
Before you start contributing, familiarize yourself with the structure and purpose of the NixOS Wiki:


'''1.3 Finding an Issue or Package to Work On'''
* '''Explore the wiki:''' Visit this Wiki's main categories to understand its organization and the types of content it hosts. The wiki covers installation guides, configuration tips, package management, and more.
* '''Engage with the community:''' Join discussions on platforms like the [https://github.com/NixOS/nixos-wiki-infra GitHub Wiki Repository]. Active participation can highlight areas where documentation needs improvement.


Contributions often begin by identifying an issue to address or a package to update within Nixpkgs:
==== 2.2 Contributing Content ====
Contributions to the NixOS Wiki involve creating new pages or editing existing ones to improve clarity and relevance:


* Explore the Issue Tracker: Visit the Nixpkgs issue tracker on GitHub to find open issues, package requests, or ongoing discussions. Look for issues tagged as "Packaging request" or "Build failure" to get started.
* '''Create a wiki account:''' Register an account on the NixOS Wiki to start contributing. This allows you to create and edit pages directly.
* '''Identify areas for improvement:''' Review current wiki pages to find gaps or areas that could benefit from more detailed explanations. Focus on topics that are frequently discussed or updated in the community forums.
* '''Understand the wiki structure:''' Familiarize yourself with the wiki's category system to ensure your contributions are properly organized and easily discoverable.


'''1.4 Contributing Code'''
==== 2.3 writing and editing wiki pages ====
Follow these guidelines when writing or editing content on the NixOS Wiki:


Once you've identified an issue or package to work on, you can start contributing code:
* '''Learn the syntax:''' The NixOS Wiki uses MediaWiki markup. Familiarize yourself with this syntax to format your contributions effectively.
* '''Provide context and examples:''' Ensure content is clear and understandable. Include examples and practical advice to help users implement solutions effectively. When possible, provide both simple and advanced examples to cater to users of different skill levels.
* '''Linking:''' Use internal wiki links to connect related pages and external links to reputable sources for further reading. This helps users navigate through related topics seamlessly. Add them to the "References" category too.
* '''Use templates:''' Use existing wiki templates to maintain consistency across pages and provide standardized information.


* Fork and Branch: Fork the Nixpkgs repository on GitHub and create a new branch for your changes.
==== 2.4 Submitting edits ====
* Make Changes: Implement the necessary changes to the package definition or address the issue using the Nix expression language. Ensure your changes adhere to the Nixpkgs packaging guidelines and maintain consistency with existing code.
Once you've prepared your contributions, submit them to the NixOS Wiki:
* Testing: Test your changes locally to verify functionality and compatibility with other packages. Include appropriate tests if required by the package's guidelines or to validate new functionality.


'''1.5 Submitting a Pull Request (PR)'''
* '''Save page:''' Use the wiki's editing interface to save the changes directly. Preview your edits to ensure they appear as intended before saving.
* '''Document changes:''' Write a concise summary of your edits in the edit summary box. This informs other contributors about the purpose of your changes and helps maintain a clear edit history.
* '''Follow the style guide:''' Adhere to the NixOS [[Manual of Style]] to ensure consistency across the wiki.


When your changes are ready, submit a pull request to the Nixpkgs repository for review:
==== 2.5 Engaging in discussions ====
Stay connected with the NixOS Wiki community to foster collaboration and knowledge sharing:


* Push Changes: Push your branch to your forked repository.
* '''Discuss changes:''' Participate in discussions on the wiki's discussion pages or relevant community forums. Solicit feedback on proposed changes to refine content and ensure accuracy.
* Create a PR: Navigate to the Nixpkgs repository on GitHub, select your branch, and create a pull request. Provide a clear title and detailed description of your changes. Reference any relevant issues or discussions to facilitate review and feedback.
* '''Review and update:''' Regularly review existing wiki pages to keep information current. Update content based on new features, community feedback, or changes in the NixOS environment.


'''1.6 Collaboration and Feedback'''
==== 2.6 Advanced contributions ====
For those looking to make more significant contributions:


Collaborate with the Nixpkgs community and address feedback on your PR:
* '''Create new sections:''' Identify and propose new sections or categories that could benefit the wiki's structure and organization.
* '''Categorize articles:''' You can [[Mark articles with category tags|categorise pages adding one or more category tags]].
* '''Translate content:''' Help make the NixOS Wiki more accessible by contributing translations to other languages.
* '''Develop wiki tools:''' If you have programming skills, consider contributing to tools that can help maintain and improve the wiki, such as bots for automated tasks or extensions to enhance wiki functionality.


* Review and Iterate: Respond promptly to comments and suggestions from maintainers and contributors. Make necessary revisions to your code to address any requested changes or improvements.
==== 2.7 Conclusion ====
* Engage in Discussions: Participate in discussions related to your contribution and other ongoing developments within Nixpkgs. Contributing isn't just about code; sharing insights and knowledge can enrich the community.
Contributing to the official NixOS Wiki allows you to improve the community's knowledge base and support users in adopting and maintaining NixOS effectively. By adhering to these guidelines and actively engaging with the community, you play a vital role in improving the accessibility and comprehensiveness of NixOS documentation.


'''1.7 Conclusion'''
Remember that the NixOS Wiki is a living document, continuously evolving with the NixOS ecosystem. Your contributions, no matter how small, are valuable in keeping this resource up-to-date and helpful for users worldwide.


Contributing to Nixpkgs offers an opportunity to contribute to a widely-used package repository and collaborate with a diverse community of developers and users. By following best practices and actively engaging with the community, you can make meaningful contributions to the Nix ecosystem.
== Contributing to Nixpkgs ==
Contributing to [https://github.com/NixOS/nixpkgs Nixpkgs], the package repository for the [https://nixos.org/ Nix package manager], allows you to help maintain and improve the ecosystem of software available to Nix users. This guide outlines steps to get started with contributing to Nixpkgs effectively.


See also [[Contributing to nixpkgs]].
==== 1.1 Getting started ====
Before you begin, familiarize yourself with how Nixpkgs is structured. The [https://nixos.org/manual/nixpkgs/stable/ Nixpkgs manual] provides detailed documentation on how packages are defined and managed. It's essential to understand concepts like:


There is also a [[nixpkgs-dev-ml|Maillinglist]] where you can submit patches if you prefer to submit patches via email. These will then be forwarded to [[Nixpkgs]] as a pull request by someone on the mailing list.
* Package derivations
* Nix expression language
* Nixpkgs architecture


==== 1.8 Alternative: Contribute to Nix User Repositories ====
==== 1.2 Setting up your development environment ====
In case your package(s) don't fit within nixpkgs, you may consider creating your own [[Nix User Repository]] (NUR) to share your work with others. This cuts down on maintenance costs among community members, and gives you a way to receive feedback from others.
To start contributing to Nixpkgs, ensure your development environment is properly configured:


== Contributing to the Official NixOS Wiki ==
* '''Install Nix''': [https://nixos.org/download.html Install Nix] on your local machine if you haven't already. This allows you to build packages and test changes locally.
Contributing to the official NixOS Wiki is an invaluable way to improve documentation, share knowledge, and support users in navigating the NixOS ecosystem. This guide provides clear steps to help you begin contributing effectively to the NixOS Wiki.
* '''Clone the repository''': Fork and clone the Nixpkgs repository from GitHub.


==== 2.1 Getting Started ====
==== 1.3 Finding an issue or package to work on ====
Before you start contributing, familiarize yourself with the structure and purpose of the NixOS Wiki:
Contributions often begin by identifying an issue to address or a package to update within Nixpkgs:


* '''Explore the Wiki:''' Visit the NixOS Wiki to understand its organization and the types of content it hosts. The wiki covers installation guides, configuration tips, package management, and more.
* '''Explore the issue tracker''': Visit the [https://github.com/NixOS/nixpkgs/issues Nixpkgs issue tracker] on GitHub to find open issues, package requests, or ongoing discussions. Look for issues tagged as "good first issue", "help wanted", or "packaging request" to get started.
* '''Engage with the Community:''' Join discussions on platforms like the [https://github.com/NixOS/nixos-wiki-infra GitHub Wiki Repository]. Active participation can highlight areas where documentation needs improvement.
* '''Check outdated packages''': Use tools like [https://github.com/Mic92/nixpkgs-review nixpkgs-review] to identify outdated packages that need updating.


==== 2.2 Contributing Content ====
==== 1.4 Contributing code ====
Contributions to the NixOS Wiki involve creating new pages or editing existing ones to improve clarity and relevance:
Once you've identified an issue or package to work on, you can start contributing code:


* '''Create a Wiki Account:''' Register an account on the NixOS Wiki to start contributing. This allows you to create and edit pages directly.
* '''Branch''': Create a new branch for your changes using a descriptive name.
* '''Identify Areas for Improvement:''' Review current wiki pages to find gaps or areas that could benefit from more detailed explanations. Focus on topics that are frequently discussed or updated.
* '''Make changes''': Implement the necessary changes to the package definition. Ensure your changes adhere to the [https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#conventions Nixpkgs packaging guidelines] and maintain consistency with existing code.
* '''Testing''': Test your changes locally using <code>nix-build</code> to verify functionality and compatibility with other packages. Include appropriate tests if required by the package's guidelines or to validate new functionality.
* '''Documentation''': Update relevant documentation, including the package's meta attributes and any necessary usage instructions.


==== 2.3 Writing and Editing Wiki Pages ====
==== 1.5 Submitting a pull request (PR) ====
Follow these guidelines when writing or editing content on the NixOS Wiki:
When your changes are ready, submit a pull request to the Nixpkgs repository for review:


* '''Learn the syntax:''' ...
* '''Push changes''': Push your branch to your forked repository.
* '''Provide Context and Examples:''' Ensure content is clear and understandable. Include examples and practical advice to help users implement solutions effectively.
* '''Create a PR''': Navigate to the Nixpkgs repository on GitHub, select your branch, and create a pull request. Provide a clear title and detailed description of your changes using the provided PR template. Reference any relevant issues or discussions to facilitate review and feedback.
* '''Linking:''' Use internal wiki links to connect related pages and external links to reputable sources for further reading. This helps users navigate through related topics seamlessly. Add them to the "References" category too.
* '''CI Checks''': Ensure your PR passes all continuous integration checks. Address any failures promptly.


==== 2.4 Submitting Edits ====
==== 1.6 Collaboration and feedback ====
Once you've prepared your contributions, submit them to the NixOS Wiki:
Collaborate with the Nixpkgs community and address feedback on your PR:


* '''Save Page:''' Use the wiki's editing interface to save the changes directly. Preview your edits to ensure they appear as intended before saving.
* '''Review and iterate''': Respond promptly to comments and suggestions from maintainers and contributors. Make necessary revisions to your code to address any requested changes or improvements.
* '''Document Changes:''' Write a concise summary of your edits in the edit summary box. This informs other contributors about the purpose of your changes.
* '''Engage in discussions''': Participate in discussions related to your contribution and other ongoing developments within Nixpkgs. Contributing isn't just about code; sharing insights and knowledge can enrich the community.
 
* '''Be patient''': The review process may take time due to the high volume of contributions. Stay engaged and be prepared to make updates as needed.
==== 2.5 Engaging in Discussions ====
Stay connected with the NixOS Wiki community to foster collaboration and knowledge sharing:


* '''Discuss Changes:''' Participate in discussions on the wiki's talk pages or relevant community forums. Solicit feedback on proposed changes to refine content and ensure accuracy.
==== 1.7 (Bonus) continuous learning and improvement ====
* '''Review and Update:''' Regularly review existing wiki pages to keep information current. Update content based on new features, community feedback, or changes in the NixOS environment.
Contributing to Nixpkgs is an ongoing learning process:


==== 2.6 Conclusion ====
* '''Stay updated''': Keep up with changes in Nixpkgs by following the [https://weekly.nixos.org/ NixOS weekly newsletter] and joining community channels on platforms like [https://matrix.to/#/#nixos:matrix.org Matrix] or [https://discord.gg/RbvHtGa Discord].
Contributing to the official NixOS Wiki allows you to improve the community's knowledge base and support users in adopting and maintaining NixOS effectively. By adhering to these guidelines and actively engaging with the community, you play a vital role in improving the accessibility and comprehensiveness of NixOS documentation.
* '''Attend community events''': Participate in [https://nixcon.org/ NixCon] and other community events to network and learn from experienced contributors.
* '''Explore advanced topics''': Dive into advanced Nix topics like [https://wiki.nixos.org/wiki/Flakes flakes] and [https://wiki.nixos.org/wiki/Overlays overlays] to enhance your contributions.


== Contributing to Nix ==
==== 1.8 (Bonus) alternative contribution methods ====


See the [https://github.com/NixOS/nix/blob/master/CONTRIBUTING.md Nix repository contribution guide].
* '''Mailing List''': Submit patches via the [https://lists.nixos.org/mailman/listinfo/nix-devel Nixpkgs mailing list] if you prefer email-based contributions.
* '''Nix User Repositories (NUR)''': Consider creating your own [https://github.com/nix-community/NUR NUR] to share packages that may not fit within Nixpkgs. This can be an excellent way to experiment and receive community feedback.


== Contributing to the documentation ==
==== 1.9 Conclusion ====
Contributing to Nixpkgs offers an opportunity to impact a widely-used package repository and collaborate with a diverse community of developers and users. By following best practices, actively engaging with the community, and continuously learning, you can make meaningful contributions to the Nix ecosystem and help shape the future of declarative package management.


See [[Contributing to Nix documentation]].
For more detailed information, refer to the official [https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md Contributing to nixpkgs] guide in the Nixpkgs manual.


== Support other users ==
== References ==
* [https://www.divio.com/en/blog/documentation/ Types of documentation]


Nix/NixOS is a community-led effort. It is up to every participant to help each other learn and use Nix effectively.  Here are some ways to help other users:


* Help users on the [https://discourse.nixos.org/ Nix Discourse].
* Help users on the Nix Matrix (real time chat). Consider joining a [[MatrixRooms|Matrix room]] that matches your interest/expertise.
* Write blog posts on how to do things with Nix(OS).
* Engage with others on social media about Nix(OS).
[[Category:Development]]
[[Category:Development]]
[[Category:Contributions]]
[[Category:Contributions]]
{{DEFAULTSORT:NixOS Contributor's Guide.}}

Latest revision as of 06:10, 3 September 2024

It is possible to contribute to Nix(OS) in different ways:

Contributing to Nix

See the Nix repository contribution guide.

Contributing to the documentation

Reference documentation and learning materials for using Nix standalone are maintained on nix.dev by the Nix documentation team.

See Contributing Documentation for how you can help.

Contributing to the Official NixOS Wiki

Contributing to the official NixOS Wiki is an invaluable way to improve documentation, share knowledge, and support users in navigating the NixOS ecosystem. This guide provides clear steps to help you begin contributing effectively to the NixOS Wiki.

2.1 Getting started

Before you start contributing, familiarize yourself with the structure and purpose of the NixOS Wiki:

  • Explore the wiki: Visit this Wiki's main categories to understand its organization and the types of content it hosts. The wiki covers installation guides, configuration tips, package management, and more.
  • Engage with the community: Join discussions on platforms like the GitHub Wiki Repository. Active participation can highlight areas where documentation needs improvement.

2.2 Contributing Content

Contributions to the NixOS Wiki involve creating new pages or editing existing ones to improve clarity and relevance:

  • Create a wiki account: Register an account on the NixOS Wiki to start contributing. This allows you to create and edit pages directly.
  • Identify areas for improvement: Review current wiki pages to find gaps or areas that could benefit from more detailed explanations. Focus on topics that are frequently discussed or updated in the community forums.
  • Understand the wiki structure: Familiarize yourself with the wiki's category system to ensure your contributions are properly organized and easily discoverable.

2.3 writing and editing wiki pages

Follow these guidelines when writing or editing content on the NixOS Wiki:

  • Learn the syntax: The NixOS Wiki uses MediaWiki markup. Familiarize yourself with this syntax to format your contributions effectively.
  • Provide context and examples: Ensure content is clear and understandable. Include examples and practical advice to help users implement solutions effectively. When possible, provide both simple and advanced examples to cater to users of different skill levels.
  • Linking: Use internal wiki links to connect related pages and external links to reputable sources for further reading. This helps users navigate through related topics seamlessly. Add them to the "References" category too.
  • Use templates: Use existing wiki templates to maintain consistency across pages and provide standardized information.

2.4 Submitting edits

Once you've prepared your contributions, submit them to the NixOS Wiki:

  • Save page: Use the wiki's editing interface to save the changes directly. Preview your edits to ensure they appear as intended before saving.
  • Document changes: Write a concise summary of your edits in the edit summary box. This informs other contributors about the purpose of your changes and helps maintain a clear edit history.
  • Follow the style guide: Adhere to the NixOS Manual of Style to ensure consistency across the wiki.

2.5 Engaging in discussions

Stay connected with the NixOS Wiki community to foster collaboration and knowledge sharing:

  • Discuss changes: Participate in discussions on the wiki's discussion pages or relevant community forums. Solicit feedback on proposed changes to refine content and ensure accuracy.
  • Review and update: Regularly review existing wiki pages to keep information current. Update content based on new features, community feedback, or changes in the NixOS environment.

2.6 Advanced contributions

For those looking to make more significant contributions:

  • Create new sections: Identify and propose new sections or categories that could benefit the wiki's structure and organization.
  • Categorize articles: You can categorise pages adding one or more category tags.
  • Translate content: Help make the NixOS Wiki more accessible by contributing translations to other languages.
  • Develop wiki tools: If you have programming skills, consider contributing to tools that can help maintain and improve the wiki, such as bots for automated tasks or extensions to enhance wiki functionality.

2.7 Conclusion

Contributing to the official NixOS Wiki allows you to improve the community's knowledge base and support users in adopting and maintaining NixOS effectively. By adhering to these guidelines and actively engaging with the community, you play a vital role in improving the accessibility and comprehensiveness of NixOS documentation.

Remember that the NixOS Wiki is a living document, continuously evolving with the NixOS ecosystem. Your contributions, no matter how small, are valuable in keeping this resource up-to-date and helpful for users worldwide.

Contributing to Nixpkgs

Contributing to Nixpkgs, the package repository for the Nix package manager, allows you to help maintain and improve the ecosystem of software available to Nix users. This guide outlines steps to get started with contributing to Nixpkgs effectively.

1.1 Getting started

Before you begin, familiarize yourself with how Nixpkgs is structured. The Nixpkgs manual provides detailed documentation on how packages are defined and managed. It's essential to understand concepts like:

  • Package derivations
  • Nix expression language
  • Nixpkgs architecture

1.2 Setting up your development environment

To start contributing to Nixpkgs, ensure your development environment is properly configured:

  • Install Nix: Install Nix on your local machine if you haven't already. This allows you to build packages and test changes locally.
  • Clone the repository: Fork and clone the Nixpkgs repository from GitHub.

1.3 Finding an issue or package to work on

Contributions often begin by identifying an issue to address or a package to update within Nixpkgs:

  • Explore the issue tracker: Visit the Nixpkgs issue tracker on GitHub to find open issues, package requests, or ongoing discussions. Look for issues tagged as "good first issue", "help wanted", or "packaging request" to get started.
  • Check outdated packages: Use tools like nixpkgs-review to identify outdated packages that need updating.

1.4 Contributing code

Once you've identified an issue or package to work on, you can start contributing code:

  • Branch: Create a new branch for your changes using a descriptive name.
  • Make changes: Implement the necessary changes to the package definition. Ensure your changes adhere to the Nixpkgs packaging guidelines and maintain consistency with existing code.
  • Testing: Test your changes locally using nix-build to verify functionality and compatibility with other packages. Include appropriate tests if required by the package's guidelines or to validate new functionality.
  • Documentation: Update relevant documentation, including the package's meta attributes and any necessary usage instructions.

1.5 Submitting a pull request (PR)

When your changes are ready, submit a pull request to the Nixpkgs repository for review:

  • Push changes: Push your branch to your forked repository.
  • Create a PR: Navigate to the Nixpkgs repository on GitHub, select your branch, and create a pull request. Provide a clear title and detailed description of your changes using the provided PR template. Reference any relevant issues or discussions to facilitate review and feedback.
  • CI Checks: Ensure your PR passes all continuous integration checks. Address any failures promptly.

1.6 Collaboration and feedback

Collaborate with the Nixpkgs community and address feedback on your PR:

  • Review and iterate: Respond promptly to comments and suggestions from maintainers and contributors. Make necessary revisions to your code to address any requested changes or improvements.
  • Engage in discussions: Participate in discussions related to your contribution and other ongoing developments within Nixpkgs. Contributing isn't just about code; sharing insights and knowledge can enrich the community.
  • Be patient: The review process may take time due to the high volume of contributions. Stay engaged and be prepared to make updates as needed.

1.7 (Bonus) continuous learning and improvement

Contributing to Nixpkgs is an ongoing learning process:

  • Stay updated: Keep up with changes in Nixpkgs by following the NixOS weekly newsletter and joining community channels on platforms like Matrix or Discord.
  • Attend community events: Participate in NixCon and other community events to network and learn from experienced contributors.
  • Explore advanced topics: Dive into advanced Nix topics like flakes and overlays to enhance your contributions.

1.8 (Bonus) alternative contribution methods

  • Mailing List: Submit patches via the Nixpkgs mailing list if you prefer email-based contributions.
  • Nix User Repositories (NUR): Consider creating your own NUR to share packages that may not fit within Nixpkgs. This can be an excellent way to experiment and receive community feedback.

1.9 Conclusion

Contributing to Nixpkgs offers an opportunity to impact a widely-used package repository and collaborate with a diverse community of developers and users. By following best practices, actively engaging with the community, and continuously learning, you can make meaningful contributions to the Nix ecosystem and help shape the future of declarative package management.

For more detailed information, refer to the official Contributing to nixpkgs guide in the Nixpkgs manual.

References