this post was submitted on 11 Jul 2023
16 points (100.0% liked)

Nix / NixOS

1784 readers
1 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

I'm new to nix, but I really went full beans on it: installed NixOS on my daily and I'm using nix-shell for some projects and yesterday I learned how nix docker images work.

I was actively avoiding flakes because I try never to use unstable/experimental features until they are stabilised so I can rely on them.

Thing is, they seem to be ubiquitous. Their reason to exist makes sense to me and I think I should learn how to use them to fully take advantage of the ecosystem.

My question: is it fairly safe to assume nix flakes won't suddenly break on me? is there any known roadmap to flakes stabilisation?

all 7 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 year ago (1 children)

The flakes interface of nix may change in the future, and you should be prepared to update your code, documentation etc. if and when that happens. Consider flakes have been around since nix 2.4 and the interface haven't drastically changed since then. If that risk sounds acceptable to you, then do use it :)

There is an ongoing effort to get flakes away from the experimental category, but as you may guess, it is a big chunk to stabilize all at once. The original RFC was closed https://github.com/NixOS/rfcs/pull/49 a long while ago, due to it describing the experimental feature, and not the final one. AFAIK, there's no "one" RFC being discussed on finalizing an initial stable version of flakes (but I could swear I've heard of one).

[–] [email protected] 1 points 1 year ago (1 children)

When you say that flakes haven’t “drastically changed”, does it mean no breaking changes at all? only new features?

[–] spikespaz 1 points 1 year ago

Yes. The format is widely accepted by the community and generally everybody's preferred way of organizing and sharing code.

[–] expr 1 points 1 year ago

I quite like flakes on the whole, but there is still, in my opinion, a pretty big unsolved issue, in that it's impossible to configure a flake. Some consider it a feature, and in some sense it is, but at the same time it incurs some pretty hefty drawbacks (admittedly, these are much more relevant for using nix as a build tool rather than as a package manager for an OS).