Managing package repos - - `stable`, `unstable`, Flakes

There are three ways for NixOS users to install packages.

Let’s take Hyprland for example:

  • Official “Stable” channel 24.11: Hyprland v45.2: Only fresh on November 30, 2024 on launch day of NixOS v24.11. As time goes by, as Hyprland issues more updates, the Hyprland package in the repo will continue to age until the next stable channel is released in May 2025. For NixOS v24.05, by the end of that channel’s release cycle in November 2024, the Hyprland package was 10+ major (not just point) releases behind. This will not do.

  • Official “Unstable” channel rolling release: Hyprland v46.2 While it may not be updated in real time, the 2 volunteer package maintainers will publish a package within a 1-2 week delay. The Hyprland upstream release sometimes takes a short while to be distributed downstream to the unstable nixpkg repo. I could live with this.

  • Flakes: The day Hyprland devs tag a release, a NixOS user can invoke a build from source with a properly scripted Flake to begin using the latest changes in real time.

Flakes are the fastest. Unstable channel updates come in with varying degrees of delays. It would depend on how on the ball the package maintainers are. Stable channels only get package updates twice a year (once in May, again in November) included as part of the NixOS release cadence development cycle. Waiting a few weeks for the unstable channel to populate with updates is reasonable for me but the stable channel just doesn’t cut it.

The warnings surrounding the possibility of Home Manager messing up a system with no rollback support is a bit disconcerting as someone starting out with Nix and NixOS like myself. I’d like to use Hyprland as close to upstream as possible without risking borking my system (at least until I learn more about the nix scripting language and am more confident with handling Flakes and using home-manager).

What is holding me back from changing my channel from stable to unstable is the extensive list of other packages I have installed. I don’t want to be running nightly development builds of alpha quality software. Preview releases are full of bugs for developers to experiment with. If unstable means “nightly alpha quality builds” then I am stuck with the “stable” nixpkg channel that just gets outdated too quickly, or almost instantly in the case of Hyprland.

Is that a fair assessment? What would you people think or suggest?

And what does unstable actually mean? How likely would it actually be to encounter breaking changes in packages published to the unstable channel?

And also how stable nixpkgs considers the change? Sometimes upstream pushes broken changes that aren’t suitable for nixpkgs. (Which is definitely true for hyprland.)

Why will this not do?

If you want stability, that sounds like exactly what you want.

This option doesn’t really have much to do with flakes; they’re just a standard mechanism to compose Nix projects.

You could just overlay Hyprland to be some other version yourself without any flakes involved; right from your config. You then get to choose when you update to which version.

I’d recommend you completely ignore home-manager or flakes until you’ve gained more experience then. They’re not in any way required, especially not when starting out.

That’s fair.

You won’t. That’s not what the unstable channel means.

The difference between stable and unstable is that unstable continuously receives (potentially) breaking changes as they happen while breaking changes are coordinated to happen at discrete points on stable:
At two times a year, the (at that time) current state of unstable is branched off with everything exactly as it was at that time and that’s how it largely stays until EOL.

Again, does that hurt you in any way? Just because a new version is out, doesn’t mean you need to update immediately.

You do need to update at some point as change is inevitable but we afford you the ability to delay that point aswell as all other points of potential breakage into one point in time via the stable release; that’s its entire purpose.

I touched on most of this earlier but I want to add that unstable can break unintentionally too. While we obviously try to avoid it, it’s not always feasible. It may very well happen that some of the packages in your closure break at some point and aren’t fixed for some time; though most such packages that have actual users are usually fixed within a week or so.

1 Like