Different channel generation


I installed NixOS 21.11 (minimal ISO) in a VM and used NixOps inside latest docker nixos/nix image to deploy a new configuration/generation without specifying a particular channel anywhere.
The output of nix-channel --list is:
nixos nixos-21.11 release nixos-21.11.335820.521e4d7d13b
Somehow in the GRUB boot menu the generations 1-4 alternate between 21.11 and 22.05pre, and I’m wondering why?

Turns out the docker image is on 22.05pre:
bash-4.4# nix-channel --list
nixpkgs nixpkgs-unstable release nixpkgs-22.05pre352484.1882c6b7368

Kind regards,

This is the tag for nixos-unstable. Likely the nixops operations are running under unstable.

Yes, I figured that had to be it indeed.

Related question:

The manual states:

If you wish to change the channel used by the system-level configuration ( /etc/nixos/configuration.nix ), ensure you run the correct nix-channel command as root:

Is it not possible to declare the channel in configuration.nix explicitly?

With flakes, absolutely.

pre-flakes. The convention was NIX_PATH=nixpkgs=/path/to/nixpkgs. If you do echo $NIX_PATH, it should point to file paths, that’s where nixpkgs is coming from. nix-channel command just happened to update those paths, which gives the sense of “updating”.

But I haven’t used nixops too much, so i can’t comment on that workflow.

Thanks for your quick responses!

Is the flake interface stable yet? I’m relatively new to Nix, does it make sense to learn using flakes instead of derrivations?

Flakes are pretty good.

Nixops is a cool tool, but all development is going into nixops 2.

Quick Plug for

Which is a flake only deployment tool which is actively being worked on.

Use the source Luke…
May the flakes be with you, always!