Live data from Hacker News

Nix – Death by a Thousand Cuts

dgt.is

161–170 of 336 posts

Re: Nix – Death by a Thousand Cuts

#161

Earlier quoted context omitted.

You can run generic Linux stuff if you install nix-ld¹, the only tricky bit is having to customize the set of libraries given to nix-ld for your use-case. It includes various common libraries by default, but depending on what you want to run you may have to add to it. ¹ https://search.nixos.org/options?channel=unstable&show=progr...

There’s also nix-alien which does this but tries to be more automagical.

nix-alien is an older, worse approach that is not that well maintained

Re: Nix – Death by a Thousand Cuts

#162
I've tried Nix on a couple of occasions, most recently about two months ago, and ended up coming to the conclusion that it's just not for me.

I can see the value in a completely declarative configuration for my OS.

But the hurdles to get something worthwhile out of that value prop are just too high with my (low) level of skill (in this area) coupled with the limited time I have to build new skills. There are other things I want to invest my time in, but I can totally see this being where someone wants to spend some of their time.

I've never found setting up a Linux distro the way I want it particularly hard and once in a while I like to just start from a blank slate to see what's new—so yeah, not for me.

Re: Nix – Death by a Thousand Cuts

#163
post #85

Earlier quoted context omitted.

You can run generic Linux stuff if you install nix-ld¹, the only tricky bit is having to customize the set of libraries given to nix-ld for your use-case. It includes various common libraries by default, but depending on what you want to run you may have to add to it. ¹ https://search.nixos.org/options?channel=unstable&show=progr...

Interesting, I didn't realize that that was an option. I've been getting by with buildFHSenv and Flakes, which, despite my complaints, really isn't that annoying. My goal at this point is to eventually compile all my flakes and take on Lutris.

I would probably still use buildFHSenv if I was trying to package up a third-party binary for installation in my configuration. My usage of nix-ld is actually to solve the problem of using VSCode Remote to connect to my NixOS machine, and in particular to allow it to run binaries it downloads onto the machine for extensions (typically LSP servers).

Re: Nix – Death by a Thousand Cuts

#164
post #59

I love the ideas behind Nix. But as noted here, there's a thousand cuts to be found. My biggest issue has been packaging binary distributed programs. These often want files in a particular directory somewhere, often want to find relative path libraries or plugins, want certain configuration options in etc... None of that Just Works, there's a whole confusing method to try and monkey patch the software to work but its…

That's just proprietary software assuming you are on something Debian or red hat like. The problem is on them being closed and hostile towards improvement.

Also for someone not knowing Rust it is also very intimidating and if you start to go into more complex things you are easily out of luck with the tutorials out there.

The monorepo is not that big of an issue. More often you are being bitten by badly maintained software that doesn't work with a 3 year old compiler or upstream is unwilling to move forward because of LTS support or something.

Re: Nix – Death by a Thousand Cuts

#165

Earlier quoted context omitted.

Worth noting that ChatGPT et al. Are equally useless for debugging Nix. Frustrating that it’s so far behind. Error messages are often cryptic and misleading.

Yep, I thought ChatGPT was trained on Github but it's generated precisely 0 correct .nix files for me to date.

Are you complaining that AI is not the savior of everything?

Re: Nix – Death by a Thousand Cuts

#166
post #131
post #77

Earlier quoted context omitted.

As a heavy container user myself - I've been using containers since I needed to build my own 3.x kernel to test them - docker doesn't solve the reproducibility problem nix solves - IE, I can make a Dockerfile that does `RUN curl foo.com/install.sh` and who knows if that'll work ever again. Nix on the other hand doesn't allow you to do IO during builds[^0] only describe the effect of doing the IO. [0]: Though apparent…

You can just store the actual container though. Which will reproduce the environment exactly, it's just not a guidebook on how it was built. The value of most reproducibility at the Dockerfile is that we're actually agnostic to getting a byte-exact reproduction: what we want is the ability to record what was important and effect upgrades.

> Which will reproduce the environment exactly, it's just not a guidebook on how it was built.

By that logic every binary artifact is a "reproducible build". The point of reproducibility isn't just to be able to reproduce the exact same artifact, it's to be able to make changes that have predictable effects.

> The value of most reproducibility at the Dockerfile is that we're actually agnostic to getting a byte-exact reproduction: what we want is the ability to record what was important and effect upgrades.

More or less true. But we don't have that, because of what grandparent said; if a Dockerfile used to work and now doesn't, and there's an apt-get update in it, who knows what version it was getting back when it was working, or how to fix the problem?

Re: Nix – Death by a Thousand Cuts

#167
post #64

Earlier quoted context omitted.

This is why I haven't switched my NixOS to flakes yet. The community discussions always act as though flakes should be the default that everyone should use now, but I figure that the developers know what they're doing and haven't made them the blessed path yet for a reason. So far so good—my system is far more stable than it was under Debian and I've yet to run into anything that didn't have an easy answer. I have a…

> I figure that the developers know what they're doing and haven't made them the blessed path yet for a reason. My take is: flakes don’t align with centralised nixpkgs and ultimately don’t solve any problems that can’t be solved without flakes. They’re just an interface for a decentralised module system. You can use them, they’re feature-complete, and they don’t align with nixpkgs: it doesn’t make sense for individua…

Flakes bring you one interface to share common dependencies which is kot possible without an interface.

Re: Nix – Death by a Thousand Cuts

#169

i use nixos on VMs, my desktop (Gaming and productivity) and servers. I use flakes for everything. I've painfully learned how to do everything I need. My only big complaint is updating systemd. I have yet to figure out the systemd update bug. Sometimes nixos-rebuild-switch takes my network offline when updating systemd. It's incredibly annoying to update a box and have it drop offline. My work around is to do a 'diff…

Probably because it restarts the network service. You can configure the systemd unit to be only reloaded or nothing at all m

Re: Nix – Death by a Thousand Cuts

#170

I courted making the switch to NixOS a couple times, but I just don't really see the value add to me right now. Yes, if you have a lot of machines then it maybe make sense. At this point I just use Nix home manager for my dotfiles/userspace programs on a normal distro and I feel like I get 90% of the benefit without any of the headaches.

I delete your entire system file system right now. How fucked are you?

With NixOS: I don't care. You can recover from a half deleted root file system.

Post reply on HN