Live data from Hacker News

The Curse of NixOS

blog.wesleyac.com

261–270 of 361 posts

Re: The Curse of NixOS

#261

There is Nickel in development which might replace Nix (the configuration language) in future. https://github.com/tweag/nickel

Let's hope that it gets proper docs until then, that actually lay out its syntax before trying to compare it to other languages. From what I gather, it's branching off of Nix and assuming familiarity with it. What does the `in` keyword do and why is it everywhere?

From everything I can see from the code examples I highly doubt that it will reduce the number of complaints NixOS has about using a weird language.

Re: The Curse of NixOS

#262

Earlier quoted context omitted.

Maybe you should look within. I'm still a long ways from understanding everything Nix/NixOS completely, but I've never gotten these kinds of comments apart from the extremely reasonable "you should start out by reading the introduction docs" - that the directions lead with. And if you have a problem with that, I can see how you might have provoked that kind of response that seems so out of character to me. I ask ques…

This is a pretty good example the kind of victim blaming I'm talking about. It's a kind of insidious toxicity that permeates certain communities, although I've not been able to put my finger on what exactly brings it out, or why it's so tightly clung to as an acceptable behavior in some places. I actually tried to help for awhile, and even started a help guide https://github.com/kstenerud/nixos-beginners-handbook/ Bu…

I'm not trying to judge you harshly. I'm trying to understand.

In your first post in this thread, "high tier" NixOS users were called condescending sadists. This is a libel as far as I can tell based on my own experience.

Then was a list of disliked phrases, and second to last in that list was the instruction to read the manual. I believe in reading manuals, as difficult and time-consuming as the effort may be. This made me think expectations for using the project were wrong.

Now you're linking to a repo you made to attempt to give new users a guide to getting started.

You clearly made an effort to be part of the solution. This is admirable.

I'm trying to connect dots here - what I think happened was, in the course of trying to get help filling in the blanks, you probably exhausted the patience of others trying to help you.

I question if what you've been trying to do works at this point in the project's lifecycle. What you're trying to do is hard enough in a completely mature project. In an environment where we acknowledge the incompleteness of documentation, new command line APIs that are evolving, and new ways of doing things (I'm currently thinking of containers after looking at your guide, and flakes as well), communicating a true North is extremely difficult especially if you aren't one of the core developers immersed in the current state of change.

I don't think the project is mature enough to declare a "right way" to do all the things. I don't think we have enough mature users to support filling in all the blanks, yet, either.

I'm sorry you've had the experience you've had. Maybe after taking a break, you can resume your efforts, but with tempered expectations. We're all asking a lot of people who volunteer their time to build what should be acknowledged as a strategically important approach to computing.

We need more experts. The experts we do have are over-worked and under-appreciated. Perhaps you can help us there one day too.

Re: The Curse of NixOS

#263

Earlier quoted context omitted.

I've tried to use Nix on and off for years. I always run into issues where I need to write some package and (1) I get mired in packaging low level transitive dependencies and things which seem like they should be easy end up being nearly impossible (2) Basic things like figuring out the argument types for a particular nixpkgs function take an insanely long time. It always involves grepping around the whole repo (nixp…

Yeah, I've had that similar experience too, and I'd love to see an approach that can fundamentally improve on this axis. The way I see it, it's the foundational ideas that are important—but there are a few key principles beyond the one covered in the blog post. Separately, today , I think the foundational advantages Nix has more than justify the learning curve—but that's a less obvious idea and I understand why it's…

The trouble is that it's the foundational ideas that people find weird and difficult. Functional programming is still niche and so both immutable package installations and nix-the-language don't build on what people already know.

I hope that'll change over time, because yeah, the foundations are /so/ powerful, even today.

Re: The Curse of NixOS

#264
post #6

"""The first is relatively simple: they developed their own programming language to do configuration, which is not very good and is extremely difficult to learn. The vast majority of people using NixOS do not understand the language, and simply copy/paste example configurations, which mostly works until you need to do something complicated, at which point you're completely high and dry.""" Maybe this is nitpicking, b…

> the Nix language is about as straightforward as "JSON plus functions". Except that they concoct weird custom terminology for everything . It's not a hashmap, or a map, or an object. No. It's an attrset . Riiiiight. It's not a build script, it's a derivation . Etc, etc.

Yeah, naming a key-value data structure `set` was a really poor choice. A derivation isn't really a build script though.

Re: The Curse of NixOS

#265
post #143
post #5

Earlier quoted context omitted.

Guix uses patchelf. Patchelf is very useful anytime you want to change the location of dynamic loaded libraries but don't want to set LD_LIBRARY_PATH. It is used in more places than you might originally think.

We don't use patchelf for any official package definition. We have a package for patchelf, but it's only really useful when you have pre-built binaries that you can't rebuild from source.

The main guix monorepo may set that hard requirement the everything just be built from source, but if you want to run closed source software than your only two options are make a fake FHS or use patchelf. Both methods have pros and cons. Only patchelf makes the result work well with other closed source programs.

While from a philosophical point of view guix is pure, real world usage often needs closed source software.

Re: The Curse of NixOS

#266
post #145

Earlier quoted context omitted.

Yes, the low number of readily available packages is the primary reason I switched from Guix to Nix.

The default channel of Guix has more than 21,000 packages. Is that what counts as a "low number" these days?

People don't care about 21000 packages they care about say 5. An environment which has 5 has excellent software availability for that user. One that has 3 it has for that user poor availability.

Debian has far more packages but pure numbers are hard to compare when packages are broken up in different fashions and missing 1 package that 30% of users desire is more problematic than missing 1000 package that collectively 3% of users desire. More so if that 1 package is required for the users computer to work properly or indeed at all.

For a substantial number of users Guix has insufficient software availability and one notes that for example that for example Fedora which is very free software focused doesn't forbid you from discussing nonfree software in its channel. Elsewhere you tout that RMS wasn't allowed to remove clang from the package collection as if it were proof of value. Other distributions don't have benevolent dictators trying to remove useful free software for ideological reasons.

We are all habituated to what we perceive as normal. Neither situation is actually normal and indeed is sufficient reason by itself to ignore a superior product like GUIX and does a disservice to the cause of free software by decreasing the number of people willing to put up with it. I'd go so far as to say that without more liberal attitude from other player the entire free software movement would already be dead. A free software only default is perfectly fine as is acknowledging practical consideration to drive interest in free software in order to provide a larger base of people from which to draw potential contributors in order to continue to strengthen the base.

If GUIX is Debian than someone ought to just make a Ubuntu that largely ignores ideology and focuses on the practical.

Re: The Curse of NixOS

#267

This post is dead-on. I've been trying nix in different forms for years, and it's been incredibly painful. The way the folks who use it normally talk about it is so different from real-life use by non-experts it feels like gaslighting. I only felt vindicated when reading https://ianthehenry.com/posts/how-to-learn-nix/ -- it's not me it's them. Maybe one day it'll get good enough to be usable. Right now it's a long, l…

I've been messing with GUIX, just because the configuration language is much less confusing to learn and understand.

You might as well try Spack, it's Python + a dsl to customize builds in a single line. Guix package descriptions look very daunting to me.

[1] https://github.com/spack/spack/

Re: The Curse of NixOS

#268

Earlier quoted context omitted.

Use LUKS, don't use LVM. I do that with ZFS for all the non-ancient stuff in github.com/Ericson2314/nixos-configuration

Why avoid LVM? If you could point me to a practical instruction on how to get it running I’d be very thankful! I’m sure I’m missing something basic - as is usual when struggling with UNIXes…

There is some LVM FUD I can't confirm, but really, it's just simpler.

ZFS filesystems within the same "pool" are also just more flexible.

The NixOS config part you can take from my repo. The command line part is the same as for any other linux. From memory:

cryptsetup luksformat physical-part

cryptsetup open physical-part arbitrary-name

some-command-to-make-file-system ... /dev/mapper/arbitrary-name

mount /dev/mapper/arbitrary-name

Re: The Curse of NixOS

#270

I've been using Nix and NixOS for a while and I've seen four core advantages: 1. Nix store: what the article covers: multiple versions of the same package, "virtualenv for everything"... etc 2. Reproducibility: because package definitions are self-contained, I can pin and reliably reproduce everything for my packages. And I do mean everything. 3. Flexibility: Nix works for system packages on NixOS as well as user pac…

I've tried to use Nix on and off for years. I always run into issues where I need to write some package and (1) I get mired in packaging low level transitive dependencies and things which seem like they should be easy end up being nearly impossible (2) Basic things like figuring out the argument types for a particular nixpkgs function take an insanely long time. It always involves grepping around the whole repo (nixp…

Have you looked into Guix? In some ways it's a bit simpler and cleaner because it is a much more recent effort and Scheme is somewhat easier. It might help with the learning process in case you disliked Nix. GuixSD does have some other drawbacks. I'm personally running NixOS but both are very cool.

Nix certainly has a steep curve, but simple things are not that hard. I got committed to migrate to Nix one Monday. I spent the whole morning reading about it. In the afternoon, my workstation was already up and running. On the same evening, I packaged two exotic things I need which weren't on NixPkgs. Next day, I fixed my favorite window manager, which was broken on NixPkgs. I maintain all these on NixPkgs now.

Complicated things are not that easy, and I would not have been able to do all this if I had encountered non-trivial issues in the process. I also totally understand that the learning curve is steep. Nix has too much legacy stuff and cruft built in. There's the classic Nix command, Nix 2.0 and Nix flakes. They are all coexisting and not very well documented. Nix needs more manpower, funding and tooling.

With that said, declarative stuff is poised to be harder for non-trivial stuff. Just like Haskell is harder than C, NixOS is harder than ArchLinux or Alpine. I still very much find it worth the effort for simple workflows. I can now update remote machines without fearing breakdowns and state is very explicit.

Post reply on HN