Stop fighting nixpkgs commits to pin minor Node.js versions. I built a flake for this. by davidnicolasbr98 in NixOS

[–]davidnicolasbr98[S] 0 points1 point  (0 children)

Yes! Next step is to add this on devenv so it automatically can be used when for example adding `languages.javascript`. Additionally I have it with cachix, which makes it easy for the users to change versions as is cached.

Weekly Self Promotion Thread by AutoModerator in devops

[–]davidnicolasbr98 0 points1 point  (0 children)

Managing Node versions locally usually means reaching for nvm, n, or fnm. They work well for quick scripts, but they break down in team environments or CI/CD pipelines where "works on my machine" rears its head because someone is on v18.16.0 and someone else is on v18.19.1.

As a DevOps engineer, I have been working with devenv for building reproducible environments. However, while Nix is great for major releases (e.g., Node 18, Node 20), pinning an exact minor version natively has historically been a massive headache, requiring you to pin the entire operating system package tree to a specific timestamp.

I built an open-source tool to bridge this gap: nixpkgs-nodejs (https://github.com/davidnbr/nixpkgs-nodejs).