Channel branches: Difference between revisions

remove link to outdated web service
Sdht0 (talk | contribs)
Copyedit and attempt to describe better
Line 1: Line 1:
Nixpkgs is the Git repository containing all package reciptes and NixOS module declarations. Installing packages directly from the <code>master</code> branch of the Nixpkgs repository is possible but risky, since Git commits are merged into <code>master</code> before being heavily tested. That's where channel branches are useful.
Nixpkgs is the Git repository containing all package recipes and NixOS module declarations. Installing packages directly from the <code>master</code> branch of the Nixpkgs repository is possible but risky, since Git commits are merged into <code>master</code> before being heavily tested. That is where channel branches are useful.


A "channel branch" is Git branch with the "verified" Git commits in Nixpkgs that is exposed on [https://channels.nixos.org channels.nixos.org]. There is also a [https://status.nixos.org channel status webpage] that tracks the age of channel branches.
A "channel branch" is Git branch with the "verified" Git commits in Nixpkgs that is exposed at [https://channels.nixos.org channels.nixos.org]. There is also a [https://status.nixos.org channel status webpage] that tracks the age of channel branches.


Each channel branch has a different definition of what "verified" means. Each time a new Git commit is "verified", the corresponding channel branch gets updated. Contrary to users of the <code>master</code> branch, channel branch users will benefit from both "verified" commits and pre-built packages from the [https://cache.nixos.org public binary cache].
Each channel branch follows a corresponding development branch to which new commits are first added. These new commits are then "verified" using the [[Hydra]] continuous integration system, where each channel branch corresponds to building any new or updated packages for that branch and perform the associated tests. A channel branch is updated once its builds succeeds for a new commit. Contrary to users of the development branches, channel branch users will benefit from both "verified" commits and pre-built packages from the [https://cache.nixos.org public binary cache].


There are several types of channel branches, each with its own use case and verification phase.
There are several types of channel branches, each with its own use case and verification phase.
Line 12: Line 12:


* Stable/unstable:
* Stable/unstable:
** Stable channels (<code>nixos-23.11</code>) provide conservative updates for fixing bugs and security vulnerabilities, but do not receive major updates after initial release. New stable channels are released every six months.
** Stable channels (<code>nixos-23.11</code>) only provide conservative updates for fixing bugs and security vulnerabilities, but do not receive major updates after the initial release. New stable channels are released every six months.
** Unstable channels (<code>nixos-unstable</code>, <code>nixpkgs-unstable</code>) correspond to the main development branch (unstable) of Nixpkgs, delivering the latest tested updates on a rolling basis.
** Unstable channels (<code>nixos-unstable</code>, <code>nixpkgs-unstable</code>) follow the <code>master</code> branch of Nixpkgs, delivering the latest tested updates on a rolling basis.


* Large/small:
* Large/small:
** Large channels (<code>nixos-23.11</code>, <code>nixos-unstable</code>) provide binary builds for the full breadth of Nixpkgs.
** Large channels (<code>nixos-23.11</code>, <code>nixos-unstable</code>) are updated only after Hydra has finished building the full breadth of Nixpkgs.
** Small channels (<code>nixos-23.11-small</code>, <code>nixos-unstable-small</code>) are identical to large channels, but contain fewer binaries. This means they update faster, but require more to be built from source.
** Small channels (<code>nixos-23.11-small</code>, <code>nixos-unstable-small</code>) are identical to large channels, but are updated as soon as Hydra has finished building a defined set of commonly-used packages. Thus, users following these channels will get faster updates but may need to build any packages they use from outside the defined set themselves. These channels are intended to be used for server setups, for example.


Most users will want the stable/large channel, currently <code>nixos-23.11</code>.
Most users will want the stable/large channel, currently <code>nixos-23.11</code>.


NixOS uses [https://nixos.org/manual/nix/stable/command-ref/files/profiles Nix profiles] for the <code>root</code> user to refer different versions of the system-wide configuration. Profiles set for other users control only the user environment for that user.
NixOS uses [https://nixos.org/manual/nix/stable/command-ref/files/profiles Nix profiles] for the <code>root</code> user to refer different versions of the system-wide configuration. Profiles set for other users only control the user environment for that user.


== Channel update process ==
== Channel update process ==