3 ms·
Nix does this too and maintains perfect caching from top to bottom.
by mikepurvis 3y ago
Nix does this too and maintains perfect caching from top to bottom.
- SAI_Peregrinus 3y agoNix is a build & metaprogramming system, not (just) a configuration language.
- tazjin 3y agoNix is a bunch of things, one of which is a configuration language.
- garethrowlands 3y agoA major difference is that Nix has no type system or schema. Pkl is typed.
- soraminazuki 3y agoThe NixOS module system has those and can be used independently of NixOS despite its name.
- zilti 3y agoA bafflingly ugly configuration language.
- sanderjd 3y agoBut I have no idea how I would build a config structure for an application using Nix... It seems very powerful so I'm sure it's possible, but I just have no idea where I'd start for this specific use case. Whereas this documentation for Pkl is entirely about that use case.
- mikepurvis 3y agoI agree that there's a huge documentation and user awareness gap, but NixOS is obviously possible to configure this way so it's definitely possible. Might be room for a tool that exposes just the configuration management side of Nix in a more approachable way... on the other hand it would be a bit silly to use nix for conf files and not also for the underlying packages.
- sanderjd 3y agoI guess it strikes me as not just a documentation and awareness gap, but a different paradigm in a more fundamental way. I think your last sentence gets at that too: For Nix, configuration management is just one component of a broader and more powerful paradigm. And it seems to me like putting a square peg in a round hole (or as you say, a bit silly) to try to use it to solve this narrower and simpler problem.
- __MatrixMan__ 3y agoBetter to learn a tiny corner of nix (which you may later apply to the rest of it, or not) than to learn a language with a narrower use case. But one who embraces nix fully is one who is willing to commit a lot of time to turning their back on convention. Returning to 90% of the conventions that they worked so hard to leave behind probably won't excite them. So it's not silly, it's just that the person to do it is culturally unlikely.
- sanderjd 3y ago> Better to learn a tiny corner of nix (which you may later apply to the rest of it, or not) than to learn a language with a narrower use case. "Better" in what way? Like, maybe I agree in some sort of philosophical sense, of how it's better to learn and expand one's awareness of what exists and is possible in the world. That is, better for students, similarly to how I'd say it is better for students to learn lisp and haskell, because they'll figure out how to use javascript and python and C# or whatever as needed on the job. And I'm a believer in life-long learning, that everyone should do their damndest to carve out time to be a student at all times throughout life. So certainly I'm in favor of learning about Nix and its config structure and comparing and contrasting it to other things like this Pkl. But I don't think the idea of using Nix's config management instead of a narrowly-targeted config management tool would be "better" in the sense of a professional figuring out how to set up or refactor the config structure within the non-Nix paradigm of the vast majority of organizations. And that's what I've been talking about here. I'm actually a Nix kool-aid drinker, believe it or not, and I hope its paradigm will sweep the world, but I also have to do what's right by the organizations I work within at each moment in time, and being at the vanguard of the Nix paradigm has not been that, in my view, yet.