Live data from Hacker News

I think it's time to give Nix a chance

maych.in

101–110 of 156 posts

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

#101
post #82

Earlier quoted context omitted.

Building those applications consistently and reliably, e.g. being able to hop on a random Linux box and be able to build and deploy an application without thinking about where to fetch copies of all the dependencies. Nix’s raison d’etre is really to make developer lives easier, IMO. I don’t use Nix, but I’ve played with other Linux package managers enough to understand the desire for something better, and something t…

"build and deploy" are two entirely different tasks. Both the macOS .app design, and various ad-hoc Linux packaging strategies deal with the deployment step in a relatively trivial, extremely non-invasive way. The build step is something else entirely, and while I can imagine that for some projects what Nix offers has much value, for others the problem is solved by a permanently deployed build stack (or stacks) whose…

I think you're right that it's the build step where nix provides value. It's about replacing:

> a permanently deployed build stack (or stacks)

with a consistently deployable build stack. So if you want to distribute a .app package, you could use nix to build it, and then people could download it and install/configure it according to some different scheme.

But if it's trivial to reliably instantiate the build stack, why not just ship that instead and dispense with the special format? Then nobody has to wonder if you slipped some malware in the package before you distributed it.

The idea behind NixOS is that since we must precisely define our build stack anyway, why not use the same technology to define the rest of our OS. Maybe that's overkill for some, but it sure is handy that there are NixOS users out there so when I want to use something from nixpkgs when defining my dev environment on MacOS it already has the kinks worked out.

As for

> ...whose specificity goes beyond anything that a distro-managed system could offer.

My feeling is that most nix code is not distro managed but rather written by individual project maintainers. We only bother contributing something to nixpkgs if we think it's widely applicable.

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

#102

This article felt like a strong argument against Nix rather than in favor of it. The complexity it brings is just not worth the gains for the majority of people that I know. No, most people won't be happy that Nix breaks dynamic linking. Docker with a Debian Stable base will solve the problems listed for most users, with 1% of the time investment. The author used Nix for 8 years, and I'm not surprised it looks a bit…

> No, most people won't be happy that Nix breaks dynamic linking.

True. In my case I just enabled nix-ld[0,1] and now everything works flawlessly.

[0]: https://github.com/nix-community/nix-ld

[1]: https://wiki.nixos.org/wiki/Nix-ld

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

#103
post #38

Earlier quoted context omitted.

I think Nix is getting an unfair reputation for being too hard. Simple things are IMHO simpler in Nix than in any other distribution, and what one needs to know to accomplish them is tiny. It has basically reduced my sysadmin maintenance tasks to zero. In case of regressions, Nix makes it trivially easy to go back in time 2 or 3 years, cherrypick some packages and install them, or change your entire desktop environme…

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…

Do you have a link that explains what atoms are? This is the first time I'm hearing about them.

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

#104
post #14

I was so excited to give Nix a chance, but I'd prefer to program in Guile rather than Nix, so now I'm excited to give Guix a chance lol. Going to install it this Wednesday on new laptop, wish me luck

Better check to make sure your laptop's hardware, particularly WiFi, is compatible. Most aren't.

You can install/run guix using a nonfree kernel to get around that.

https://wiki.systemcrafters.net/guix/nonguix-installation-gu...

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

#105
post #14

I was so excited to give Nix a chance, but I'd prefer to program in Guile rather than Nix, so now I'm excited to give Guix a chance lol. Going to install it this Wednesday on new laptop, wish me luck

I installed it a few months ago, I thought it was pretty good! I couldn't find a prebuilt package mirror in or near Australia though so it was painfully slow to install updates, and I didn't stick with it.

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

#106
post #35

For me it is another Gentoo. I had my time trying every new distro that would be popping up on Linux related magazines CD/DVDs up to the mid-2000's (they still do in some European countries), unless it comes on a laptop I can get at the mall computer store, or some customer imposes it on our delivery contract, not really something I want to give a chance to.

To me Gentoo vs. NixOS is like night and day. Building an entire system from scratch only takes you a few minutes in Nix, whereas with Gentoo you'll likely still be compiling X tomorrow night.

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

#107

Wow. 1) you can python environment with dependencies! (can do that without nix) 2) you can pin dependencies by hash! (can be done with any tool mentioned in article: docker, pip, npm etc) If you can't make reproducible dev environment in 2025 - it is 100% skill issue.

Having to think about docker's hashing/caching scheme and also pip's and also npm's and to apply them each separately in CI and in a local environment and in dev/stage/prod... for a large repo that's a lot of work. Easy to overlook whichever one you're less concerned about at the time and put the repo in some kind of inconsistent state where something works here but not there.

There's a lot to be said for having a single lockfile for all of them.

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

#108

Ubuntu user of 15 years here (+ a couple years of tinkering with RedHat, Arch & Gentoo before that). I tried to learn Nix (the language) a couple years ago, didn't like it and got nowhere. Now, two months ago I heard I would be getting a Windows machine at my new client, so I really wanted a way to deterministically generate a Linux VM that worked & felt exactly the same as my usual setup. So I thought back to Nix(OS…

Are you using NixOS, or are you using Nix + home-manager or something like that to manage your user's stuff?

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

#109
post #16

Nope, not yet. I tried that 3 times, once for my mac, then for my linux and once for a project. Every time I gave it a solid try found it lacking so I made a note to wait a few more years. The promise of reproducible systems is so hard to resist but nix brings crazy complexity (not all of it necessary), I'd prefer a system where their package repo has 4 packages but it makes it easy enough to me to bring other packag…

Yeah I think this is a big flaw of declarative systems. I see a Nix derivation that contains `foo: bar`. How do I know what this does? It's pretty much impossible to know without learning all of Nix, because anything can access it. If it was a function call you could just go-to-definition. Environment variables have a similar issue. It's often hard to know what they do because they could be used by basically anything…

I find this to be a real issue with environment variables.

I am trying to create a tool to help see exactly where and by which program any environment variable was set/exported since boot.

This is still in the conceptual phase but I'm looking into linux' ftrace to achieve this. Any ideas or pointers are welcome.

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

#110

Earlier quoted context omitted.

Mainly the mindshare. Nix has a massive set of packages. You’ll have to build more derivations for guix.

I assumed that, but "only" that? I genuinely wonder. I did not get around to try Nix yet.

I think it’s “only” that yeah. Both have fundamentally the same capabilities. Nixpgs may provide more out of the box library functionality than guix, I’m not sure, but as far as I know there’s nothing possible in one that isn’t possible in the other. Would be glad to be corrected by anyone with more experience, though. I’ve run NixOS for years now, but have only dabbled with guix.
Post reply on HN