Live data from Hacker News

I think it's time to give Nix a chance

maych.in

141–150 of 156 posts

Re: I think it's time to give Nix a chance

#141

Earlier quoted context omitted.

Been there. Powered through it. It gets easier when you actually read the Nix manual.

Nix Pills are probably the best way to get a deep understanding of Nix and some underpinnings of nixpkgs. I read the pills when I started using Nix in 2018 and never had much difficulty understanding the language or most of nixpkgs.

The biggest thing I've hit is linking issues with Rust -sys crates (ie. C/C++ libraries wrapped). There's some very strange behavior if you include gcc and clang (for example) into the same environment.

My biggest issue with Nix tbh is it adds an annoying step to every random repo I want to clone and build.

Re: I think it's time to give Nix a chance

#142

Nix is still waiting for its GitHub moment. It's possible to live a strictly better life (as an individual or company) via Nix and NixOS but there's still a ton of lore and inside baseball that requires a pressing need to justify learning it all. If there's a serious Nix person in your company or friend group it's time, otherwise be ready for a learning curve that's only worth it if you have one of the problems it so…

Couldn't have said it better, this is a perfect description

> It's the choice of people who can't compromise on anything (Anduril, more and more trading shops, shit like that).

This is crucial- Nix has interhent advantages in certain industries where it IS genuinely easier than any alternatives. We're gonna see adoption start there and disseminate to general tech companies in a more consumerized form IMO

Re: I think it's time to give Nix a chance

#143
I’ve tried a few times now, it’s great when you don’t have to actually write nix yourself. At scale though the typeless dictionary style parameter approach is so impossibly unreadable, constantly hunting down some nixos helper and its underspecified parameters is painful. Its honestly a lot of the same pain yaml has at scale. Lack of typing means more burden on me to remember everything, except nix adds to this a really tough debugging story as it’s lazy and the error messages aren’t usually that helpful.

Re: I think it's time to give Nix a chance

#144

Earlier quoted context omitted.

I've been using Nix and NixOS since 2022. I can't imagine not using Nix at this point and agree that the reputation for "being too hard" is not quite accurate. Nix is different - that's the point. The learning curve is a thing, although I'd argue that it's nowhere near as steep as the tools many of us use every day (C++, Rust, AWS/GCP, etc.) Nix's "difficulty" IMO comes from defaults that are not sane and a split com…

I like your Atoms idea and will follow along IMO 80% of Nix's shortcomings are due to 20 years worth of tech debt that we're all very conscious of By 2030 all the rust rewrites and new tooling will have finally saved us from it

Unless it becomes a typed language with clearer syntax around what is what, it’s painful at the scale of nixpkgs and nix without nixpkgs just isn’t all that useful.

Re: I think it's time to give Nix a chance

#145

Earlier quoted context omitted.

Which makes "next to zero time wasted configuring things" false, very much so. You will have to write your own derivation(s) using Nix[1]. In any case, from the article, what does not apply to Guix, too? I am leaning towards Guix because of its language (Scheme, i.e. Lisp-y), but I wonder about the differences between the two, today (besides userbase and hype). [1] https://nix.dev/tutorials/nix-language.html

Agreed on Guix. Used it for a few years, absolutely loved it, excited to go back (had to move off for unimportant and unrelated reasons). Would love to hear from someone who has used both though. I've never seen an excellent, detailed comparison actually, as conversation on the subject tends to devolve into a "discussion" on ethics. Meaning, people who dislike GNU or GPL or Lisps or something get testy and argue unch…

Guix not supporting non-free packages out of the box is the only real issue I have and that’s directly tied to the gnu origins. If guix were as pragmatic as NixOS and nixpkgs then I don’t think I’d have anything to say, lisp is way nicer.

Re: I think it's time to give Nix a chance

#146
post #79

Nix falls into the camp in my mind that includes Rust: great idea that I just don't have time for right now. Reproducibility is the holy grail, IMO. It is so valuable that any system that actually achieves it will find some longevity and eventually be hammered into a useable form. I believed in the promise when AWS was all about amis. Then I believed in the promise with docker. It seems something like Nix is a natura…

> Reproducibility is the holy grail, IMO

> I'll stick with […] docker with alpine for my deployments

Huh. In my experience Alpine is the worst possible base image to use if you care about reproducibility.

  - The package index's URL cannot be pinned (URL expires on a regular basis)
  - The downloaded package index itself (tarball) cannot be pinned/cached, either, because old package versions (i.e. the URLs in the tarball) become unavailable after a few weeks.
Meanwhile:

https://snapshot.debian.org/

https://snapshot.ubuntu.com/

Re: I think it's time to give Nix a chance

#147

> More importantly, Docker containers themselves aren’t reproducible—running apt-get update or pip install requests at different times can yield different results, even with the same Dockerfile. apt-get install = > And frankly, no one really needs Kubernetes, they just have it because everyone and their grandma has it. I digress, that’s a topic for another day. Oh grow up, ffs.

> apt-get install =

That's still not reproducible unless you use snapshot.debian.org or snapshot.ubuntu.com as upstream package index.

Re: I think it's time to give Nix a chance

#148
post #144

Earlier quoted context omitted.

I like your Atoms idea and will follow along IMO 80% of Nix's shortcomings are due to 20 years worth of tech debt that we're all very conscious of By 2030 all the rust rewrites and new tooling will have finally saved us from it

Unless it becomes a typed language with clearer syntax around what is what, it’s painful at the scale of nixpkgs and nix without nixpkgs just isn’t all that useful.

https://nickel-lang.org/ is a configuration language similar to a typed Nix

I'm hopeful something like this could get adopted in future Nix tooling

Re: I think it's time to give Nix a chance

#149
post #145

Earlier quoted context omitted.

Agreed on Guix. Used it for a few years, absolutely loved it, excited to go back (had to move off for unimportant and unrelated reasons). Would love to hear from someone who has used both though. I've never seen an excellent, detailed comparison actually, as conversation on the subject tends to devolve into a "discussion" on ethics. Meaning, people who dislike GNU or GPL or Lisps or something get testy and argue unch…

Guix not supporting non-free packages out of the box is the only real issue I have and that’s directly tied to the gnu origins. If guix were as pragmatic as NixOS and nixpkgs then I don’t think I’d have anything to say, lisp is way nicer.

Keep an eye out for https://gitlab.com/nonguix/nonguix.

Re: I think it's time to give Nix a chance

#150

> More importantly, Docker containers themselves aren’t reproducible—running apt-get update or pip install requests at different times can yield different results, even with the same Dockerfile. apt-get install = > And frankly, no one really needs Kubernetes, they just have it because everyone and their grandma has it. I digress, that’s a topic for another day. Oh grow up, ffs.

> apt-get install = That's still not reproducible unless you use snapshot.debian.org or snapshot.ubuntu.com as upstream package index.

You can easily host and manage your own package repository. My point is that this apparent limitation is not in itself a strong enough reason to embark on NIX.

Go fill your boots if you want to use NIX, power to you, but be honest about why if you're going to write a piece about it.

Post reply on HN