News for hackers. Stuff that matters.
Re:Are Immutable Linux Distros right for you? by bsder on Wednesday December 25, 2024 @04:11PM (#42511187)
Nix the idea is fantastic. Nix the implementation is currently a disaster.

I liken Nix to source control in the time of CVS. We need two more implementation iterations before its going to be useful to the general public.

Re:Are Immutable Linux Distros right for you? by yoavm on Wednesday December 25, 2024 @04:30PM (#42511292)
Can you elaborate? Why is it a disaster? I've only used Nix as a package manager when my work distro doesn't have some tools I wanted to install, but the few people I know that use NixOS seem to swear by it.
Re:Are Immutable Linux Distros right for you? by clvx on Wednesday December 25, 2024 @04:49PM (#42511406)
debugging and error messages are still hard to deal with. Also, flakes should become standard at this point. Documentation on how to load modules and explore modules using nix repl is also lacking and/or frustrating. It definitely has rough edges. I do hope it will improve.
Re:Are Immutable Linux Distros right for you? by ChocolateGod on Wednesday December 25, 2024 @07:47PM (#42512324)
The CLI is also pretty badly documented, or documentation is outdated.
Re:Are Immutable Linux Distros right for you? by Chris_Newton on Thursday December 26, 2024 @05:45AM (#42514391)
For perspective, I’ve been running NixOS on my main workstation going back a few releases now.

When it works, it’s great. I like that I can install (and uninstall) much of the software I use declaratively, so I always have a “clean” base system that doesn’t accumulate numerous little packages at strange versions over time in the way that most workstations where software is installed more manually tend to do.

This is a trade-off, though. Much is made of the size of the NixOS package repository compared to other distros, but anecdotally I have run into more problems getting a recent version of a popular package installed on my NixOS workstation than I had in probably a decade of running Debian/Ubuntu flavoured distros.

If the version of the package you want isn’t available in the NixOS repo, it can be onerous to install it, because by its nature NixOS doesn’t follow some popular Linux conventions like FHS. Typically, you write and maintain your own Nix package, which often ends up similar to fetching a known version of a package from a trusted source and then following the low-level build-from-source process, but all wrapped up in Nix incantations that may or may not be very well documented, and sometimes with a fair bit of detective work to figure out all the versions and hashes of not just the package you want but also all its dependencies, which may in turn need packaging similarly themselves if you’re unlucky.

It’s also possible to run into this when you’re not installing whole software applications, including those that are available from the NixOS package repository, but rather things like plug-ins for an application or libraries for a programming language. You might end up needing a custom package for the main application so that its plug-in architecture or build system can find the required dependencies in the expected places when you try to install the extra things. Again, this is all complexity and hassle that just doesn’t happen on mainstream Linux distros. If I install Python and then `pip install somepackage` then 99.9% of the time that just works everywhere else but frequently it won’t work out of the box on NixOS.

It’s one of those things that is actually perfectly reasonable given the trade-offs that are explicitly being made, yet still makes NixOS time-consuming and frustrating in a way that other systems simply aren’t when you do run into the limitations.

This comment is already way too long, so I’ll just mention as a footnote that NixOS also tries to reconcile two worlds, and not all Linux software is particularly nicely arranged to be managed declaratively. So in practice, you still end up with some things being done more traditionally/imperatively anyway, and then you have a hybrid system that compromises some of the main benefits of the declarative/immutable pattern. There are tools like Flakes and Home Manager that help to overcome some of this as well, and as others have said, they are promising steps in good directions, but we’re not yet realising the full potential of this declarative style and it’s hard to see how we get from here to there quickly.

Re:Are Immutable Linux Distros right for you? by mongol on Wednesday December 25, 2024 @05:04PM (#42511466)
> ... disaster ...

Such an exaggregation. Many thousands of people use it by choice, despite all alternatives. Hardly a disaster, by any definition.

Re:Are Immutable Linux Distros right for you? by nightfly on Wednesday December 25, 2024 @05:10PM (#42511500)
Many thousands of people is a very small fraction
Re:Are Immutable Linux Distros right for you? by drdaeman on Wednesday December 25, 2024 @08:23PM (#42512484)
Very few people (among the world population) know what GNU/Linux is. Fewer care enough to switch to it. Even fewer know enough (or have the willpower, time and mental capacity to learn) to actually be proficient.

But among those who do, there are plenty of people who have learned Nix well enough it's no longer a weird arcane thingy that spews out incomprehensible errors for them. Although, I guess, among those no one will deny Nix can be better (but there are no multi-billion-dollar corporations spending tons of their resources on it).

It's like vim. First time you run it you probably can't even exit it - so, of course you think it's a disaster ;)

Re:Are Immutable Linux Distros right for you? by Terr_ on Wednesday December 25, 2024 @07:19PM (#42512194)
> exaggregation

Is that an aggregation of exaggerations? :p

Actually, that portmanteau kinda-works in this context.

Re:Are Immutable Linux Distros right for you? by steeleduncan on Friday December 27, 2024 @09:34AM (#42522330)
> I liken Nix to source control in the time of CVS

I think this is my favourite comment about Nix ever. I'm not going to stop using Nix until a genuinely better alternative arrives, but that day can't come soon enough