Live data from Hacker News

NixOS and my descent into insanity

ersei.net

91–100 of 120 posts

Re: NixOS and my descent into insanity

#91
post #7

Well this is enough to put anyone off Nix. Such a shame because the abstract idea is obviously a good one. But every time Nix/NixOS comes up the story is the same. Terrible UX. Terrible documentation. Is Guix any better?

Ironically, there are lots of blog posts documenting how people worked around the poor documentation, but seemingly few fixes being made in the upstream docs themselves. The excellent Arch Linux Wiki demonstrates that high-quality community-maintained docs are possible.

I think the problem is people are assuming that Nix is just one another tool.

In reality Nix is a programming language. It is a relatively simple language, but it is also functional and lazily evalated. And while the language is simple, its stdlib (nixpkgs) is actually puts another abstraction layer on top of it which is quite complex.

I do think though that Nix should do the same thing other programming languages do: identify what the nix stdlib is, move it to a separate repo with its own release schedule and ensure that whatever is added to it/removed from it is documented.

This won't help author of this blog, but it would be a great help for anyone who is willing to go through Nix Pills.

Re: NixOS and my descent into insanity

#92
post #47

This is a shame to read, I've thought of learning Nix for basic devops tasks and avoid tools like Ansible. Is this critique true for Nix in general or just NixOS?

To me it sounds like criticism of someone who jumped on it but did not want to read documentation, then also spent second time of the blog trying to have Nix run on an unprivileged account with small quota.

As for devops task, if it is something that you plan to do and many other users already did than it should be fine. If you are not happy with existing solutions and want things done your way, or it is an uncharted territory then you will need to go through the steep learning curve.

Re: NixOS and my descent into insanity

#93
post #13

NixOS is awful except for everything else out there. The learning curve is... steep. The documentation sucks. You have to learn a new OS because a lot of your prior Linux knowledge no longer applies. But, man, it's so slick when you get it working. It's so easy to understand your system and how it's set up. There's no weird stuff changing between updates that you don't know about. You don't have to merge new configur…

> with a better language, documentation on par with Arch, and the reliability of Debian.

I grok the first two, but what do you mean about the reliability of Debian?

Re: NixOS and my descent into insanity

#94
post #13

NixOS is awful except for everything else out there. The learning curve is... steep. The documentation sucks. You have to learn a new OS because a lot of your prior Linux knowledge no longer applies. But, man, it's so slick when you get it working. It's so easy to understand your system and how it's set up. There's no weird stuff changing between updates that you don't know about. You don't have to merge new configur…

I agree that NixOS (and Nix) is difficult to learn and the documentation is generally poor, which I realise is what you’re getting at in your comment, But I do think we should keep in mind what an incredible project NixOS is. NixOS isn’t just some other Linux distro, repeating pretty much what every distro has done for 40 years. It’s a complete rethink of how a Linux distribution and package manager should work, from…

> It’s a complete rethink of how a Linux distribution and package manager should work, from first principles, in a way that I don’t think has ever been done before.

Not just Linux but the OS in general.

Re: NixOS and my descent into insanity

#95

Earlier quoted context omitted.

I'm currently trying (and failing, lol) to switch to Nickel Nix. Nix OS/Pkgs is just amazing, but i'm near being entirely done with Nix Lang. Lazy + Dynamic is just a recipe for an awful developer experience. As far as i can tell no one (thus far) has been able to explain a reasonable and concrete way to tell what any given variable is within a Nix source file. `nix repl` works decently for some cases, but many not -…

I tend to agree. I was trying to follow the guide on how to install NixOS with root-on-zfs[0]. I’ve followed it before with my own tweaks just fine, but recently it was updated to include some random guy’s modules that automate a couple steps. They’re mostly shallow abstractions on first-party NixOS modules, but following it was such a pain. I’ve been putting off reverse engineering the guy’s code so I can understand…

I've been using root on ZFS for two years, but without using a specific module for it. Some info and links here: https://www.reddit.com/r/NixOS/comments/ops0n0/big_shoutout_...

Re: NixOS and my descent into insanity

#96
post #13

NixOS is awful except for everything else out there. The learning curve is... steep. The documentation sucks. You have to learn a new OS because a lot of your prior Linux knowledge no longer applies. But, man, it's so slick when you get it working. It's so easy to understand your system and how it's set up. There's no weird stuff changing between updates that you don't know about. You don't have to merge new configur…

I'm currently trying (and failing, lol) to switch to Nickel Nix. Nix OS/Pkgs is just amazing, but i'm near being entirely done with Nix Lang. Lazy + Dynamic is just a recipe for an awful developer experience. As far as i can tell no one (thus far) has been able to explain a reasonable and concrete way to tell what any given variable is within a Nix source file. `nix repl` works decently for some cases, but many not -…

> As far as i can tell no one (thus far) has been able to explain a reasonable and concrete way to tell what any given variable is within a Nix source file. `nix repl` works decently for some cases, but many not - since it seems to mostly help you inspect the output of a Nix expression. So hypothetically it could work, but for any given variable you'd have to recreate the entire value/function/etc stack that produced that value in that state.

It's certainly not ergonomic, but from what I can tell so far, `builtins.trace` and `builtins.traceVerbose` are about as good as it's gonna get. It quite literally lets you inspect any arbitrary Nix expression, but it's just such a friggin' hassle to wrap things with it & reevaluate just to do what literally any real debugger can do in two keystrokes.

> All around after ~16 months i think i'm finally done with Nix. It's Nickel or the highway for me. Not that i even love Nickel that much, but it's the bare bones of what Nix should have been in my view.

I'm curious. Have you messed around with Dhall? It's suspiciously similar to Nickel (even mentioned on their site), but it's been around longer so it's probably a bit more viable to actually make your config in Dhall. Dhall or Nickel, it'll still insanely janky and more trouble than it's worth. Personally, I've found that what's worked surprisingly well for me is just really focusing on building a good understanding of the Nix language in an effort to avoid needing to debug as much as possible. "Just don't write bugs" as the saying goes. I've been using Nix for a while, and I'm still loath to debug it.

Re: NixOS and my descent into insanity

#97
post #91

Earlier quoted context omitted.

Ironically, there are lots of blog posts documenting how people worked around the poor documentation, but seemingly few fixes being made in the upstream docs themselves. The excellent Arch Linux Wiki demonstrates that high-quality community-maintained docs are possible.

I think the problem is people are assuming that Nix is just one another tool. In reality Nix is a programming language. It is a relatively simple language, but it is also functional and lazily evalated. And while the language is simple, its stdlib (nixpkgs) is actually puts another abstraction layer on top of it which is quite complex. I do think though that Nix should do the same thing other programming languages do…

Tbh I don't understand why they created a new programming language. Why not use something like Starlark or even just sandboxed JavaScript?

Re: NixOS and my descent into insanity

#98
post #91

Earlier quoted context omitted.

I think the problem is people are assuming that Nix is just one another tool. In reality Nix is a programming language. It is a relatively simple language, but it is also functional and lazily evalated. And while the language is simple, its stdlib (nixpkgs) is actually puts another abstraction layer on top of it which is quite complex. I do think though that Nix should do the same thing other programming languages do…

Tbh I don't understand why they created a new programming language. Why not use something like Starlark or even just sandboxed JavaScript?

It's the usual argument for any domain-specific language.

Personally I loathe DSLs unless you genuinely need something really fast and really simple. Otherwise please just pick something off the shelf and save everyone the headache.

Re: NixOS and my descent into insanity

#99
post #13

NixOS is awful except for everything else out there. The learning curve is... steep. The documentation sucks. You have to learn a new OS because a lot of your prior Linux knowledge no longer applies. But, man, it's so slick when you get it working. It's so easy to understand your system and how it's set up. There's no weird stuff changing between updates that you don't know about. You don't have to merge new configur…

I'm currently trying (and failing, lol) to switch to Nickel Nix. Nix OS/Pkgs is just amazing, but i'm near being entirely done with Nix Lang. Lazy + Dynamic is just a recipe for an awful developer experience. As far as i can tell no one (thus far) has been able to explain a reasonable and concrete way to tell what any given variable is within a Nix source file. `nix repl` works decently for some cases, but many not -…

Have you tried https://github.com/nickel-lang/nickel-nix ?

I didn't use it yet, but looks like this supposed to do it.

Re: NixOS and my descent into insanity

#100
post #76

Feels like the problem people have is they are approaching Nix as a tool, instead of a programming language. I see author just dismissed tutorial, because it was "too technical" for him. I think if you don't have patience to get through nix pills, nix is likely not for you. You won't have enough patience. Also few things: - he decided to manage sway via home-manager, then got suprprised that after he made changes to…

Last time I did nix things, the language docs were not good. I’m fairly comfortable bashing my head into hard things for long periods of time but it was very hard to squeeze answers out of the internet.
Post reply on HN