Hacker News new | ask | show | jobs
by robinhoodexe 816 days ago
Nix for developer environment and building containers.

I’m wondering if it’s worth it to introduce to the rest of the company. We’re pretty comfortable building/“maintaining” ~400 container images, and it’s relatively fast (~3-5 min build time if no packages are changed), but there a lot of shared dependencies between all these container images, and using nix to get actual reproducible AND minimal container images with a shared cache of Linux and language-specific packages (dotnet, node, python and R) would bring in a ton of efficiency, as well as a very consistent development environment, but I won’t force all the developers to learn nix, so the complexity should optimally be absorbed into some higher level of abstraction, like an internal CLI tool.

I’m aware that the caching of dependencies can be improved, as well as creating more minimal container images, but it’s tricky with R and Python in particular, and then I figured why not just to balls-deep on nix that actually solved these issues, albeit at a cost of complexity.

1 comments

Can you recommend any resources on nix?
Hey! I love Nix, and I've been using it as my daily driver for more than 1 year. There is a lot of people putting a lot of energy on documenting and explaining, but the current recommendation is _suffer_.

For Docker, you could start here in this HN thread [1], for NixOS and flakes there is a video series and git [2] I used at the begining which I liked.

I wanted something a bit more 'complete', so if you will you can read through my nix repo [3].

I have built Portry and Go applications (that I'll push to nixpkgs at some point) and GCP images for VMs, so if you need a reference for that just ask :)

[1] https://news.ycombinator.com/item?id=39720007

[2] https://github.com/MatthiasBenaets/nixos-config

[3] https://github.com/francocalvo/nixos-eris