Live data from Hacker News

NixOS and my descent into insanity

ersei.net

51–60 of 120 posts

Re: NixOS and my descent into insanity

#51
post #46

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 -…

What the nix language needs is support for first-class breakpoint instructions. That is, I ought to be able to do something along the lines of `let x = break (...)` The semantics here is that, when x is evaluated (i.e., forced into WHNF), I get placed into a debugger where I can examine the context and either (1) choose to return a new value for `x` or (2) let it fall through and let `x` take on the value of `(...)`.…

Yes, anyone who has spent any serious amount of time maintaining Nix code has felt this pain. I also have come to dislike the Nix language, but it was the daily debugging that eventually drove me away. In my case, it was for production systems, and there's nothing more agonizing then having to debug a Nix stack trace on a deadline.

Re: NixOS and my descent into insanity

#52
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…

> You have to learn a new OS because a lot of your prior Linux knowledge no longer applies.

This is what confused me the most.

Nix (CLI tools / language syntax)

NixOS (A Linux distro that has CLI tools, but also some CLI tools that are only available on this distro and not others, aka "nix" doesn't really work on Debian)

Flakes vs "configuration"

I just wanted to like "terraform apply" a system configuration on my Debian install.

People are obsessed with Nix because you can manage your config for their local system

Ok... Ansible has existed for 12 years? And you can use it on Debian/don't need a full OS/distro from the ground up (NixOS)

But people will come out of the woodworks to tell you how you don't understand, you're wrong, you're missing the point, Nix is the greatest.

Re: NixOS and my descent into insanity

#53
post #24

Le sigh, another day, another group of people turned off on NixOS for completely legitimate learning curve, documentation, and support reasons that are nonetheless heartbreakingly fixable. It’s never the user’s fault . Home manager is a well-intentioned and technically well-executed piece of software that is nonetheless a disaster as the “how to do dots on Nix” story, especially for newcomers. We need “Home Manager L…

I find nix incredible but the thing that I struggle with is trying to figure out how to do things on nixpkgs, and home manager in particular while not using nixos. This is a critical use case for the apprehensive crowd like me who is averse to distro hopping, let alone willing to take on the paradigm shift of Linux-to-nixos. The documentation for either is all but non-existent and the pages I can find are glorified s…

Nixpkgs is also critical for non-apprehensive people who nonetheless need to use MacOS and other distros on a daily basis.

Re: NixOS and my descent into insanity

#54
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?

As with anything, "it depends." I think Nix and NixOS is great for personal and hobby stuff, but I cannot in good faith recommend it for anything professional. I personally run my daily driver on NixOS and haven't had any desire to change, but I'd prefer to never have to write an actual line of Nix code again.

Re: NixOS and my descent into insanity

#55
post #8

Earlier quoted context omitted.

As a fish user on NixOS, I'd say nix is still worth looking at. The fish-related issues came from trying to manage the whole of the fish configuration with Nix. I think that's a fairly niche thing to want to do.

But isn’t that the Nix promise? That I can have a fully reproducible system defined by a few configuration files?

[dead]

Re: NixOS and my descent into insanity

#57

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 -…

For building packages, don't you kind of need it to be lazy? I don't want to compile and install all of nixpkgs.

Depends, i imagine like most things - the answer is nuanced, or at the very least depends on the specific other decisions.

For example, i don't see why a configuration would install actual packages - if that's what you mean. Besides, i am not advocating against lazy by itself. I'm just saying that something which is both lazy and untyped is a huge PITA. Nickel adds typing, validation, etc - information, by which you can still have Lazy and a better DX by way of types. At least in theory, i've not used it much.

My biggest gripe is dynamic Nix, fwiw.

Re: NixOS and my descent into insanity

#58
post #46

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 -…

What the nix language needs is support for first-class breakpoint instructions. That is, I ought to be able to do something along the lines of `let x = break (...)` The semantics here is that, when x is evaluated (i.e., forced into WHNF), I get placed into a debugger where I can examine the context and either (1) choose to return a new value for `x` or (2) let it fall through and let `x` take on the value of `(...)`.…

Agreed, though i prefer types to solve this - but i imagine what you suggest would even benefit a typed language like Nickel. Really would be a useful inspection tool.

Nix is just a massive blob of difficult to debug code. Really awful experience for me.

Re: NixOS and my descent into insanity

#59
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…

> You have to learn a new OS because a lot of your prior Linux knowledge no longer applies. This is what confused me the most. Nix (CLI tools / language syntax) NixOS (A Linux distro that has CLI tools, but also some CLI tools that are only available on this distro and not others, aka "nix" doesn't really work on Debian) Flakes vs "configuration" I just wanted to like "terraform apply" a system configuration on my De…

Ansible does not even begin to accomplish what Nix does.

Re: NixOS and my descent into insanity

#60
post #8

Earlier quoted context omitted.

As a fish user on NixOS, I'd say nix is still worth looking at. The fish-related issues came from trying to manage the whole of the fish configuration with Nix. I think that's a fairly niche thing to want to do.

But isn’t that the Nix promise? That I can have a fully reproducible system defined by a few configuration files?

re: everything in Nix, i use normal configuration most of the time.

Ie with Home Manager, i just have Nix copy (link) my config files to the place apps look for them. I only would even consider recreating them in Nix if i needed programmatic construction of them or if i was trying to distribute them as a Nix package or something.

But for just me, and my own use - i see zero reason to recreate config files which are already managed by Nix. It's just extra work with no benefit as far as i can tell. Especially because i detest the Nix language. It also makes it very difficult to search for, because if you want to figure out how to configure X feature of Y app, you need to search for that and then mentally map it to Z Nix configuration which may or may not support it. It's just layers of needless abstraction for a single-use configuration.

Post reply on HN