Why there are branches nixos-21.05 and release-21.05?

One is used when adding channel, another when using flake install?

And also there is nixpkgs branch.

Where can I find more info about it?

3 Likes

I have found this:

Which channel is right for me?

You probably want to use the current stable, ie: nixos-18.03.

nixos-18.03 comes from the release-18.03 branch on GitHub. It maintains some package version stability over its six-month life, providing better guarantees that your system will keep working without major changes for the life of the release.

The stable branch also gets timely security patches delivered through channels.

The channels beginning with the nixos- prefix are thoroughly tested from the perspective of being an operating system. This means we test the X server, KDE, various servers, and lower level details like installing bootloaders and runnning the nixos installation steps. This is in contrast to the nixpkgs- channel prefix, where only limited testing is performed.

If you want to live on the bleading edge, perhaps nixos-unstable is right for you. It very frequently receives patches and updates that make larger version jumps than the stable branch.

The unstable branch also regularly receives security patches, however sometimes it can take several weeks for security patches to end up in the channels, due to test being broken.

If you are only using Nix as a package manager, perhaps the nixpkgs-unstable branch is better for you. This channel is very frequently updated, but does not receive the thorough testing the NixOS channels receive. DO NOT USE THIS FOR NIXOS.

from xLICENSE · GitHub

and from Difference between channels? - #3 by Infinisil

What do you mean by this?

nix profile install nixpkgs/release-20.09#hello

from nix profile install - Nix Reference Manual

Probably I have misunderstood that it is connected to flakes somwhow after reading Practical Nix Flakes.

In nix profile install, it is really just an example of a branch that is in Nixpkgs repo. You probably would not ever want to use that particular branch – e.g. if you need a security fix that is not yet in nixos-XX.YY, you would probably switch to nixos-XX.YY-small. Really, the only time you would want to use that branch is if you are a NixOS stable maintainer and want to test something. It might be nice to change the example to something less confusing for pedagogical reasons.

2 Likes

I came here looking for an answer to the question in the title, but I don’t think I’ve found one here.

This quote from the gist doesn’t seem to clarify what the difference is between release-X and nixos-X, does it?

Could someone help me understand exactly what happens between the two branches?

Think of release-X and nixos-X the same way you think of master and nixos-unstable. i.e. you could reasonably rename master to release-unstable and use the same relationship. Commits get pushed to release-X, then tested on Hydra, and eventually made available on nixos-X.

3 Likes

Would it be helpful to have documentation added to the nixpks README describing what branches users should care about? I’ve also been confused about this in the past.

2 Likes

I created an entry in the FAQ on the wiki.

1 Like