Hacker News new | past | comments | ask | show | jobs | submit login

> Nix was in a confusing, in-between stage in its life cycle

That's what everyone says about software that is just too complex.

I tried Nix for the first time yesterday and had a similar experience - it was just too buggy, too brittle, and too difficult. It's absolutely not worth it. The software was built to solve a difficult problem, and maybe it does that, but it became a difficult problem in itself.

For example, if you Ctrl-C while its downloading an update, you get in a weird state where nothing works. Ok, so just uninstall and reinstall right? Well, there's no uninstall. You have to manually delete everything and remove the /nix mount. Its 2023, why am I having to hunt all this down? Sure, if you reinstall it it tries to do that, but it fails every time, or it just misses things. I just don't have time for this. Nix is not even close to ready for production.




> For example, if you Ctrl-C while its downloading an update, you get in a weird state where nothing works. …

There is a new Nix installer from Determinate Systems, a company heavily invested in Nix, which should make installing Nix more atomic, reversible, and thus easier:

The Determinate Nix Installer https://news.ycombinator.com/item?id=34957953

And after getting pass the installation, Nix is great for production.


The parent talks about an interrupted update process.


Interrupted updates don't do that. In single-user mode you could maybe ctrl-c it during the final activation phase, but that's a small fraction of a second -- it's just replacing a few symlinks.

In the default multi-user mode, you can't even do that.


Yes. This is like a major benefit of nix(os), updates and everything is basically atomic. If you interrupt an update you will just have a few more downloaded folders in your nix store folder, which are trivially GC-d on the next run. This is unlike pretty much anything else.


I'll take a look, thank you.


> For example, if you Ctrl-C while its downloading an update, you get in a weird state where nothing works

Heh? Oh you mean like during installing it for the very first time? Like, what do you expect from a bash script? Is bash not ready for production? That’s quite a strong statement when you didn’t even manage to install the thing… like, at least give it an honest try before you reach such a conclusion.


To be fair, I don't think it's such a huge sacrifice from the maintainers to put a check for leftover artifacts at the start of the installation script and nuke those from orbit before proceeding.

It can be put behind a confirmation Y/N terminal line as well.

But yeah, usually bash install scripts are almost never idempotent. I feel the maintainers of those scripts just give up and IMO they really shouldn't.


>Is bash not ready for production?

Almost all bash scripts aren't


(Actually I agree with you, but I used it more as a rhetoric :D)


I don't know if this is what the GP experienced, but you can definitely get some inconsistency if you ctrl-C out of Nix while it's in single-user/daemonless mode. My sense is that single-user is really only meant as a toy and for use in unprivileged containers— in basically every other situation you want to be talking to the nix-daemon, which maintains proper state and won't get interrupted.


> if you Ctrl-C while its downloading an update, you get in a weird state where nothing works

Something else is wrong here. I've aborted updates hundreds of times without problems. Uodates are atomic and this shouldn't happen.


My problem space (building ROS packages for robots) is difficult enough that it was worth it getting over that hump for me, but I totally understand this perspective.

I'm hopeful that in two years, the community will be much more aligned around flakes, and the docs (at least the onboarding parts) will have a much clearer "happy path" oriented around accepted workflows like direnv and home-manager.


> That's what everyone says about software that is just too complex.

I'm not sure you're saying this to point fingers at the software or at the people, that is very confusing :D

That being said, Nix being in-between has been discussed in the Discourse of the project here about t supposedly simple: https://discourse.nixos.org/t/nix-shell-nix-shell-and-nix-de...

It was to me very interesting to see how insiders could be diverging and potentially not being fully aware of it.


Nix is simple to the people who made it because they won't get confused and make mistakes. If you make a mistake, you can put it in a completely broken state. That is not a simple piece of software. Its overengineered and brittle.

Homebrew is an example of a simple piece of software. It just works.


> Homebrew is an example of a simple piece of software. It just works.

But, it doesn't. I've had many packages fail to build from homebrew. Also there's a recent quote I remember:

> At some point I got frustrated with homebrew because I felt like it was spending too much time upgrading when I installed new packages, and so I thought – maybe I’ll try the nix package manager!

from https://jvns.ca/blog/2023/02/28/some-notes-on-using-nix/

> If you make a mistake, you can put it in a completely broken state. That is not a simple piece of software. Its overengineered and brittle.

Do you have any examples?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: