Hacker News new | ask | show | jobs
by noirscape 763 days ago
For me it's more often than not been the opposite. Although it's not just that you should use nix, you need to use their specific subflavor of nix features and anything else is heresy. It doesn't matter if the way it's documented is a mess, it makes sense to them.

I'm pretty sure that picking a religious denomination is less aggressive than hearing nixos users talk about how superior their system is.

1 comments

Well, you won't hear this from me. Right now, NixOS is probably not worth the time for the vast majority of people. It's hard to quantify because while the benefits of Nix are immensely clear once you have things working, the amount of effort it takes and the complexity you have to deal with to get there is downright insane. It's not that I think other people are simply incapable of understanding it, not at all; I think people are but I'm not sure if everyone who does will be pleased with how they spent their time.

However... There are people among us who don't care about whether something is "worth it" or not. We want a complete, 100% solution to some of our problems. Not a half-measure, not a hack over the top, a from scratch, 100%, complete solution. What NixOS and GuixSD do solve, they solve very, very completely. The problem is that doing it is very hard, and in my experience Nix sometimes makes things much harder and more complex than it necessarily needs to be. Of course, making things as simple as they possibly can be is hard work, and so I don't blame anyone.

A good example of a system where people are clearly unhappy is kernels, the way kernels are built in NixOS is pretty unsatisfying, and the knock-on effects of it can be pretty confusing to new users who wonder why changing which kernel they use makes it so that none of their kernel options are applied anymore. (Silently! No error, just, your kconfig options stop working!)

This is on top of the fact that the community is split on things like flakes, leaving Nix in a bit of a precarious position, where there are multiple solutions to a problem and yes, people don't agree on which one.

And also, it's built on top of functional programming paradigms, which I contend makes a lot of sense when everything clicks, but that's an additional hurdle for the vast majority of people, even programmers.

Even if Nix was as simple as it could be, what it tries to solve is a very wide problem space that is complex by its nature, and it is harder to hide that complexity the way that many Linux systems try to. So, I don't suspect it will be worth it for most people to bother learning Nix. I think that the people who know they want Nix are probably going to figure out it's what they want eventually. There's a type of person who will invest in solar panels happily without caring much about the break-even; I feel like Nix is a bit like that.

So why do people evangelize NixOS so much, when surely they know it's vastly complicated? I can't say for sure, but I can tell you one thing: when NixOS first started to "click" for me, it felt like I was experiencing a future of operating system design that is still years off. Whether Nix is the future, remains to be seen.

What sold NixOS for me were setting up servers, and I would also recommend people to set up their *servers* with.

It was when I watched someone transfer their server to another disk. It was literally one command to set up everything like it was, with bootloader, all services, ssh keys, user accounts, .... Then reboot, logging in via ssh, set an account password and that's it.

I also started using it on my workstation, but as you mentioned it is a long and tiresome process to convert my current set up to Nix and have everything work.

And another thing that really annoys me is the added time when you want to iterate quickly on a configuration file (e.g. when setting up a new program), as there is always the build process in between and looking up how to use that specific nixos module, and most of the time I need to look at the source code of the nix module to perfectly understand how to use a specific config option. So in the end I need to read the official documentation for that program, then the nix documentian and/or the nixos module definition. I have a powerful machine, but it still takes 20-40 seconds for a one line change, which would normally be 2-3s (editing the config + restarting a service)

> I have a powerful machine, but it still takes 20-40 seconds for a one line change, which would normally be 2-3s (editing the config + restarting a service)

A bit late reply, but by default Nix runs on single core. Have you made it use multi-core and max-jobs?

Okay I looked it up, and the default is max-jobs=auto (uses # of logical cores) and cores=0 (each job can use all threads), so if I have a machine with 16 cores and 32 threads, it may run 32 jobs at the same time, where each job is allowed to use 32 threads.

See:

https://search.nixos.org/options?channel=unstable&show=nix.s...

https://search.nixos.org/options?channel=unstable&show=nix.s...

and

https://nixos.org/manual/nix/stable/advanced-topics/cores-vs...

Thanks for the heads-up, will look into this, I think I tried something with this but didn't see much better performance, but has been a while since I tried that.