News for hackers. Stuff that matters.
Re:My First Impressions of Nix by SuperSandro2000 on Monday June 19, 2023 @10:10AM (#36391294)
> Extremely complicated and hard to understand

That is absolutely not true. If you start to get the hang of it and follow the way things are supposed to be done then things get easier over time. You need to invest upfront more time into your configuration but on the long run it pays off and saves you from an entire error class.

> projects that use it have builds fail anyway

The point of Nix/NixOS is not to have no failing builds but that those are reproducible and deterministic as much as possible and that those failures are noticed early and before the point of no return. A system build is supposed to fail early and not mid way through a major update and prompting you to merge some config under /etc by hand.

Re:My First Impressions of Nix by thumbuddy on Monday June 19, 2023 @10:27AM (#36391430)
I've never seen it actually pay off in industry. I've seen it be used as good job security while other devs just wrote docker files and got things done.
Re:My First Impressions of Nix by skulk on Monday June 19, 2023 @10:43AM (#36391621)
Then you're not paying enough attention. There are plenty of companies using nix to distribute a reproducible environment (if you don't believe me, why not go search GitHub for "flake.nix" and see how many "industry" repos you find).

I think it would be more productive for you to sit down and give it a fair chance than posting little rebukes all over this thread.

Re:My First Impressions of Nix by thumbuddy on Monday June 19, 2023 @02:21PM (#36394707)
I gave it a fair chance and it was a deciding factor in why I left a company believe it or not. Only one person could maintain and fix deployments. Not from lack of trying from seasoned experts and no new comers. It was the worst user experience I have probably ever encountered. Meanwhile I was able to pick up terraform and docker in a matter of days...
Re:My First Impressions of Nix by __MatrixMan__ on Monday June 19, 2023 @10:49AM (#36391693)
As the only guy maintaining the flake.nix in my team's repo, I don't think it's really contributing to my job security. I'm just happy that they don't mind the extra files and commits here and there because I value the ability to contribute from different devices without worrying about which versions of what are installed.

Maybe it'll be job security if people start agreeing that downloading binary tools in in CI without a hash check is unacceptable attack surface, but until then it's just this weird thing I'm doing on the side.

I do catch a lot of bugs where people are relying on dependencies that they happen to have installed but have not declared. It's the kind of thing that prevents newcomers from being successful out of the gate, or makes taking a local process and putting it in CI difficult, but fixing those is not exactly high visibility.

Re:My First Impressions of Nix by SuperSandro2000 on Monday June 19, 2023 @11:21AM (#36392079)
If you have something easy to deploy like a go binary you can just write a dockerfile but for big python projects that start to compile dependencies that is quickly no longer true. The dockerfile likely is also not matching the software you run and test on your local machine, so sometimes debugging is not as easy. Ofcourse you can debug inside the container but then you are missing all your tooling and need to bring that with you. And rebuilding a dockerfile is often not reproducible, so if you want the container back from 1 year ago and you no longer have the artifact you are probably out of luck.

With nix you can easily open a shell with the packages used in the docker image or go back in time and reproduce that image from a year ago with the flake.lock from a year ago.

Also applying patches to dependencies used in dockerfiles is not dead easy as with nix.

Re:My First Impressions of Nix by thumbuddy on Monday June 19, 2023 @02:28PM (#36394823)
Most people would opt to not apply patches to their dependencies in my experience. Seems kinda sketchy if that's something you have to do on a regular basis. I'd chalk that up as a possibly serious business concern depending on the magnitude of the fixes, the importance of the dependency, and the frequency.
Re:My First Impressions of Nix by kaba0 on Monday June 19, 2023 @12:28PM (#36392957)
I have written software that would have been 100% not package-able any other way.

Also, let’s not lie to ourselves, there are plenty of ridiculous contraptions out there, like docker-images used for ML that take up some insane space, and are updated each day. Packaging is a hard problem, and there is finally a tool that can actually solve it.

Re:My First Impressions of Nix by ElectricalUnion on Monday June 19, 2023 @02:01PM (#36394446)
In my experience those "others" that "just wrote docker files" are exatly the ones that don't know how to build the system in a reproducible manner if their ci environment gets reset for some reason as they find out that stuff that was "supposed to be there, pinned and configured" wasn't.
Re:My First Impressions of Nix by thumbuddy on Monday June 19, 2023 @02:24PM (#36394764)
In my experience the months required to get a handle on Nix is not worth the benefit(which is shakey in my opinion) compared to competing technologies. We don't have to agree, but that's my take...
Re:My First Impressions of Nix by ParetoOptimal on Monday June 19, 2023 @04:13PM (#36395932)
You might want to look at things like:

https://devenv.sh/

https://www.jetpack.io/devbox/

Re:My First Impressions of Nix by wpietri on Monday June 19, 2023 @12:53PM (#36393344)
You say it's "absolutely not true" that it's "hard to understand", then go on to explain how you have to "invest upfront more time", and also that you have to learn "the way things are supposed to be done".

You are very clearly describing that people have to work more to understand it. The person you're replying to even tried! Denying the experience of other people does not make that go away. It just means that the problem you're pretending doesn't exist will never get fixed.