I think every nix thread could devolve to similar griping but...
Nix is sometimes seems like a very inconsistent/app specific dsl. It's basically like maven, where everything is totally custom, but there's enough of a polite facade to give the impression there's some deeper meaning & purpose. Maybe there is deeper consistency, but it just looks to an outside like a vague dsl.
We have a very senior engineer who uses nix. And they just share their huge huge nixfile or whatever it's called, and are like, somewhere in here is some config that makes machine work. But it never illuminates what is really done, what the real changes are.
We all have to go scatter & try to re-learn what the unabstracted system is. It's such a draining experience, having to de-dsl and unpack some cryptic shit embedded deep in some dudes dsl to root out real revelation & understanding. The ease, I get, but it's all just a masquerade that seems to hide & conceal, that obstructs genuine learning, and I struggle cope with accepting this systems dsl.
I’ve been using nix for a month and definitely the hardest part is that it’s a leaky abstraction. So if it works, setting up nginx or rabbitmq is as simple as writing `service.enable = true`, and it’s truly magical.
If something goes wrong you have to understand 1. Nix 2. Nix abstraction on top of the service 3. The service and how it’s configured 4. Linux, it’s a lot to ask.
Agreed but I've found when you eventually wrestle with it you get amazing powers. E.g. Patching a system package from source in a completely reproducible way, while still remaining synchronised for package upgrades. (Assuming the patch still applies.)
All in about ten lines of code. They're called overlays if anyone is curious.
As someone who hasn't done more than dabble in Nix one weekend a few years ago, I don't doubt how powerful it is, but I'm not fully convinced that similar power couldn't be achieved with a better UX. My sense is that most people who voice concerns like the parent comment probably feel the same; right now, the amount of "activation energy" needed to get to the point where it's worth it feels too high, and I don't know if it's more likely that Nix will fix that (either in terms of better UX or documentation) or if someone else will come up with something that managed to give a better tradeoff in terms of amount of work needed to get started.
Could you give examples? There is a lot of hard work and magic going on in the build system, but you're not really supposed to interact with it as a user. As long as you pull in nixpkgs' library, package definitions are as trivial as they can get.
I really like devbox- https://www.jetpack.io/devbox very simple JSON format, direnv boilerplate generator built in. It's like easy mode for per project nix stuff.
There is a simpler way to suppress the massive log output every time you enter a directory managed by direnv. You can simply add the following line[1] to your .bashrc or whatever:
Nix is sometimes seems like a very inconsistent/app specific dsl. It's basically like maven, where everything is totally custom, but there's enough of a polite facade to give the impression there's some deeper meaning & purpose. Maybe there is deeper consistency, but it just looks to an outside like a vague dsl.
We have a very senior engineer who uses nix. And they just share their huge huge nixfile or whatever it's called, and are like, somewhere in here is some config that makes machine work. But it never illuminates what is really done, what the real changes are.
We all have to go scatter & try to re-learn what the unabstracted system is. It's such a draining experience, having to de-dsl and unpack some cryptic shit embedded deep in some dudes dsl to root out real revelation & understanding. The ease, I get, but it's all just a masquerade that seems to hide & conceal, that obstructs genuine learning, and I struggle cope with accepting this systems dsl.