Jump to content

Nix ecosystem: Difference between revisions

From NixOS Wiki
imported>Ixxie
No edit summary
detailed information on NixOS development including examples with links to where the development happens, this specifically includes non-technical examples to show that contribution does not have to be code
Tag: 2017 source edit
 
(53 intermediate revisions by 18 users not shown)
Line 1: Line 1:
The ''Nix Ecosystem'' is a collection of technologies designed to reproducibly build and declaratively configure and manage packages and systems as well as their dependencies. It achieves this by translating the functional paradigm from the program to the system domain by utilizing a dynamic, functional and lazy DSL called the [[Nix Expression Language]] for specifying reproducible builds.  
<languages/>
<translate>
<!--T:1-->
The '''Core Nix Ecosystem''' is a collection of technologies designed to reproducibly build and declaratively configure and manage packages and systems as well as their dependencies. It achieves this by translating the functional paradigm from the program to the system domain by utilizing a dynamic, functional and lazy DSL called the [[Overview of the Nix Language|Nix Language]] for specifying reproducible builds.  


<!--T:2-->
In addition there are many other [[applications]] ('''''Extended Nix Ecosystem)''''' developed by the Nix community, utilizing and supporting these core technologies.
== Official ecosystem == <!--T:3-->
<!--T:4-->
{| class="wikitable"
{| class="wikitable"
|+ Core Components of the Nix Ecosystem:
|+ Core Components of the Nix Ecosystem
|-
|-
| ''Component''
! Component
| ''Description''
! Manual
| ''Usecases''
! Description
|-
! Use
| [[Nix Package Manager]]
! License
| A package manager that parses the [[Nix Expression Language]] to specify reproducible build processes. Nix stores the results into hashed addresses, allowing multiple versions of the same package to live side by side.
| • Package management in Linux & Darwin • Reproducible building of applications & containers in production •
|-  
|-  
| [[NixOS]]
| [[NixOS]]
| [https://nixos.org/nixos/manual/ NixOS Manual]
| A Linux distribution with ''all'' components built by Nix, and thus supporting reproducible and declarative system-wide configuration management as well as atomic upgrades and rollbacks.  
| A Linux distribution with ''all'' components built by Nix, and thus supporting reproducible and declarative system-wide configuration management as well as atomic upgrades and rollbacks.  
| • Fully declarative & reproducible Linux system configuration • Desktop Systems •  Server Systems • Cluster Computing • 
| Declaratively configure desktops, servers & clusters
| MIT
|-
|-
| [[Nixpkgs]]
| [[Nixpkgs]]
| [https://nixos.org/nixpkgs/manual/ Nixpkgs Manual]
| The largest community maintained Nix package and NixOS module repository; standard releases of NixOS are hosted here.
| The largest community maintained Nix package and NixOS module repository; standard releases of NixOS are hosted here.
| • Finding & Sharing Nix Packages • Contributing to NixOS • 
| Share Nix packages & NixOS modules
|-
| MIT
| [[NixOps]]
| A Nix based deployment and provisioning tool allowing declarative specification of remote NixOS systems, VMs and containers; supports AWS, Hetzner, GCE and some other cloud providers out of box.
|  • Deploying NixOS configurations to bare-metal, virtual machines and containers  •
|-
|-
| [[Hydra]]
| [[Hydra]]
| [https://nixos.org/hydra/manual/ Hydra Manual]
| A Nix based continuous build system.
| A Nix based continuous build system.
| • Hosting a build farm for continuous integration scenarios •
| CI build farms
| GPL-3.0
|-
| [[Nix]]
| [https://nixos.org/nix/manual/ Nix Manual]
| A package manager that parses Nix expressions specifying reproducible build, putting the result in a store address with a hash of the dependency tree, sidestepping dependency hell and supporting multiversion installs and rollbacks.
| Reproducible builds & package management in Linux & Darwin
| LGPL-2.1
|}  
|}  


In addition there are many other [[applications]] developed by the Nix community, utilizing and supporting these core technologies.
<!--T:5-->
{| style="max-width: 36rem; margin: auto;"
|+'''The NixOS core ecosystem stack'''
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
<div style="font-size: 1.3em; font-weight: bold">NixOS</div>
A Linux distribution and configuration system built using Nixpkgs.
!
|-
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
<div style="font-size: 1.3em; font-weight: bold">Nixpkgs</div>
A large, community-maintained repository of packages.
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
<div style="font-size: 1.3em; font-weight: bold">Hydra</div>
A continuous build system built on Nix.
|-
|style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%" colspan="2"|
<div style="font-size: 1.3em; font-weight: bold">Nix</div>
A pure and functional build system.
|}
 
<!--T:6-->
== Usage of NixOS ==
Users install the ''NixOS'' distribution on their computers just as any other Linux distribution. They read about packages to install and configuration options in ''Nixpkgs'' via https://search.nixos.org and this wiki. They use the ''Nix'' language to declaratively describe in a text file what software packages should be installed and how the system should be configured. They run 2 command line programs in a terminal to transform the system into the described system. They use the system as any other Linux system.
 
<!--T:7-->
== Development of NixOS ==
Developers of ''NixOS'' mainly work on ''Nixpkgs''. ''NixOS'' development itself is compromised of three large areas as well as some others which are smaller by volume (but no less important). The major ones include packaging, the module system, and documentation. Packaging is done in ''Nixpkgs'' and is not exclusive to ''NixOS'' or even Linux-based platforms. Maintainers of packages which are not exclusive to ''NixOS'' (such as tooling required to run the distribution itself) usually take care of multiple platforms although not strictly required. The module system is the way in which services running on ''NixOS'' are primarily configured. This area stretches from "low-level" configuration such as ''systemd'' unit files or providing custom kernel configuration up to configuration file generation for specific services. The module system is the primary way for users to configure ''NixOS'', and lives in the <code>nixos/</code> subdirector of ''Nixpkgs''. Documentation is largely embedded in packaging and module system data, although free-standing markdown files are also contained in the ''Nixpkgs'' repository. Documentation also includes maintaining the website, Wiki, and other aspects of the wider ecosystem. The first two categories are almost exclusively ''Nix'' language code written in text files, while the latter is a mix of ''Nix'' code, markdown files, and various other formats.
All contributions to ''Nixpkgs'', regardless of whether they affect ''NixOS'' or not, are subject to peer review before being integrated into ''Nixpkgs''. Many packages alongside documentation and supplementary materials such as ISOs or tarballs are pre built on ''Hydra'' to reduce the update time for ''NixOS'' users.
Those three categories are largest by contribution volume, however many maintainers also engage in activities surrounding the NixOS foundation, maintaining the infrastructure on which website, ''Hydra'', and other tools run on, or developing tooling required for NixOS.
 
{| class="wikitable"
|+ Various examples of ''NixOS'' development along with links.
! Type of development !! Location of Development !! Examples
|-
| Platform Agnostic Packaging || ''Nixpkgs'' || [https://github.com/NixOS/nixpkgs/blob/bf3287dac860542719fe7554e21e686108716879/pkgs/tools/misc/coreutils/default.nix coreutils package], [https://github.com/NixOS/nixpkgs/tree/5fe6820251dfab92c84ff356a7c7c336f8d8490c/pkgs/stdenv ''stdenv'' framework], [https://github.com/NixOS/nixpkgs/blob/5fe6820251dfab92c84ff356a7c7c336f8d8490c/pkgs/applications/office/libreoffice/default.nix Libreoffice package]
|-
| Platform Agnostic Tooling || ''Nixpkgs'' and various repositories || [https://github.com/NixOS/nix upstream/default Nix implementation (CppNix)], [https://github.com/NixOS/hydra ''Hydra'' source code], [https://github.com/NixOS/nixpkgs-merge-bot ''Nixpkgs'' merge bot]
|-
| ''NixOS'' Tooling || mostly ''Nixpkgs'' || [https://github.com/NixOS/nixpkgs/tree/5fe6820251dfab92c84ff356a7c7c336f8d8490c/pkgs/by-name/ni/nixos-rebuild-ng nixos-rebuild-ng source code], [https://github.com/NixOS/nixpkgs/blob/5fe6820251dfab92c84ff356a7c7c336f8d8490c/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix ''NixOS'' Installation ISOs]
|-
| ''NixOS'' Module System || ''Nixpkgs'' || [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/display-managers/default.nix Display Manager configuration], [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/databases/mysql.nix MySQL (and derivative) database configuration]
|-
| Infrastructure || || [https://github.com/NixOS/nixos-wiki-infra Infrastructure for this Wiki], [https://github.com/NixOS/infra ''NixOS'' infra]
|-
| Documentation || || [https://wiki.nixos.org This Wiki], [https://github.com/NixOS/nixpkgs/blob/8d92119c540d78599ba208010c722a60958810f4/doc/stdenv/stdenv.chapter.md ''stdenv'' documentation], [https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/configuration/ipv6-config.section.md ''NixOS'' IPv6 configuration] (visible in the [https://nixos.org/manual/nixos/stable/#sec-ipv6 IPv6 section of the ''NixOS'' manual]), [https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md ''Nixpkgs'' Contribution Guidelines]
|-
| Tech Organisation || || [https://github.com/NixOS/nixpkgs/issues/390768 ''NixOS'' RelEng], [https://github.com/NixOS/rfcs/ ''Nix'' and ''NixOS'' RFCs]
|-
| Other || || [https://github.com/NixOS/nixos-artwork ''NixOS'' artwork], [https://discourse.nixos.org/ ''NixOS'' (and related) discourse], [https://github.com/NixOS/foundation ''NixOS Foundation'']
|}


[[File:Nixos-stack.png|link=]]
See also: [https://github.com/NixOS/org Nix organisation repository]


[[Category:Discussion]]
<!--T:8-->
[[Category:Ecosystem]]
[[Category:Pedias]]
[[Category:Incomplete]]
[[Category:NixOS]]
[[Category:nix]]
</translate>

Latest revision as of 16:21, 4 May 2025

The Core Nix Ecosystem is a collection of technologies designed to reproducibly build and declaratively configure and manage packages and systems as well as their dependencies. It achieves this by translating the functional paradigm from the program to the system domain by utilizing a dynamic, functional and lazy DSL called the Nix Language for specifying reproducible builds.

In addition there are many other applications (Extended Nix Ecosystem) developed by the Nix community, utilizing and supporting these core technologies.

Official ecosystem

Core Components of the Nix Ecosystem
Component Manual Description Use License
NixOS NixOS Manual A Linux distribution with all components built by Nix, and thus supporting reproducible and declarative system-wide configuration management as well as atomic upgrades and rollbacks. Declaratively configure desktops, servers & clusters MIT
Nixpkgs Nixpkgs Manual The largest community maintained Nix package and NixOS module repository; standard releases of NixOS are hosted here. Share Nix packages & NixOS modules MIT
Hydra Hydra Manual A Nix based continuous build system. CI build farms GPL-3.0
Nix Nix Manual A package manager that parses Nix expressions specifying reproducible build, putting the result in a store address with a hash of the dependency tree, sidestepping dependency hell and supporting multiversion installs and rollbacks. Reproducible builds & package management in Linux & Darwin LGPL-2.1
The NixOS core ecosystem stack
NixOS

A Linux distribution and configuration system built using Nixpkgs.

Nixpkgs

A large, community-maintained repository of packages.

Hydra

A continuous build system built on Nix.

Nix

A pure and functional build system.

Usage of NixOS

Users install the NixOS distribution on their computers just as any other Linux distribution. They read about packages to install and configuration options in Nixpkgs via https://search.nixos.org and this wiki. They use the Nix language to declaratively describe in a text file what software packages should be installed and how the system should be configured. They run 2 command line programs in a terminal to transform the system into the described system. They use the system as any other Linux system.

Development of NixOS

Developers of NixOS mainly work on Nixpkgs. NixOS development itself is compromised of three large areas as well as some others which are smaller by volume (but no less important). The major ones include packaging, the module system, and documentation. Packaging is done in Nixpkgs and is not exclusive to NixOS or even Linux-based platforms. Maintainers of packages which are not exclusive to NixOS (such as tooling required to run the distribution itself) usually take care of multiple platforms although not strictly required. The module system is the way in which services running on NixOS are primarily configured. This area stretches from "low-level" configuration such as systemd unit files or providing custom kernel configuration up to configuration file generation for specific services. The module system is the primary way for users to configure NixOS, and lives in the nixos/ subdirector of Nixpkgs. Documentation is largely embedded in packaging and module system data, although free-standing markdown files are also contained in the Nixpkgs repository. Documentation also includes maintaining the website, Wiki, and other aspects of the wider ecosystem. The first two categories are almost exclusively Nix language code written in text files, while the latter is a mix of Nix code, markdown files, and various other formats. All contributions to Nixpkgs, regardless of whether they affect NixOS or not, are subject to peer review before being integrated into Nixpkgs. Many packages alongside documentation and supplementary materials such as ISOs or tarballs are pre built on Hydra to reduce the update time for NixOS users. Those three categories are largest by contribution volume, however many maintainers also engage in activities surrounding the NixOS foundation, maintaining the infrastructure on which website, Hydra, and other tools run on, or developing tooling required for NixOS.

Various examples of NixOS development along with links.
Type of development Location of Development Examples
Platform Agnostic Packaging Nixpkgs coreutils package, stdenv framework, Libreoffice package
Platform Agnostic Tooling Nixpkgs and various repositories upstream/default Nix implementation (CppNix), Hydra source code, Nixpkgs merge bot
NixOS Tooling mostly Nixpkgs nixos-rebuild-ng source code, NixOS Installation ISOs
NixOS Module System Nixpkgs Display Manager configuration, MySQL (and derivative) database configuration
Infrastructure Infrastructure for this Wiki, NixOS infra
Documentation This Wiki, stdenv documentation, NixOS IPv6 configuration (visible in the IPv6 section of the NixOS manual), Nixpkgs Contribution Guidelines
Tech Organisation NixOS RelEng, Nix and NixOS RFCs
Other NixOS artwork, NixOS (and related) discourse, NixOS Foundation

See also: Nix organisation repository