2 ms·
I think the Nix language is a big barrier to entry for NixOS, I’ve used it quite a bit and still struggle to debug problems, I think lack of types or some basic
by madjam002 3y ago
I think the Nix language is a big barrier to entry for NixOS, I’ve used it quite a bit and still struggle to debug problems, I think lack of types or some basic type inference doesn’t help.
That said I’ve had a very positive experience packaging NodeJS apps with Nix, the /nix/store lends itself very nicely to the mess that is node_modules as each NPM package can be stored once in the store and NodeJS can read the dependencies directly from /nix/store if using something like Yarn PNP, I wrote a Yarn plugin to make this a bit easier https://github.com/madjam002/yarnpnp2nix https://github.com/madjam002/yarnpnp2nix
Using Nix as a development shell along with direnv makes for a very nice developer experience.
The thing is though, you can get these benefits even without using NixOS, you can install Nix on various Linux distros and personally I use it on macOS.
NixOS is great for servers where reproducibility and consistency is important, personally I was never a fan of tools like Ansible that are a bit of a hack.
- JamesLeonis 3y agoI am typing this on a NixOS Framework, and I'm coming to the same conclusions both you and the author. I too like many ideas NixOS presents but hit a conceptual wall when attempting to be productive. The OS is rock solid but it is difficult to learn the ins-and-outs needed to set up a developer box while also learning Nix itself. Ironically I think the best way to learn Nix is to go backwards: Build a server on NixOS, then learn how to package your app in Nix for deployment, then use NixOS as a developer machine. Server configurations are (usually) much simpler, making the language and distro easier to learn.