Hacker News new | past | comments | ask | show | jobs | submit login

Recently went from using devcontainers to nix-shell. But in every new project I include instructions for both nix-shell + direnv as well as dev containers, so people can fully ignore nix if they choose.

A form of this which mixes devcontainer and nix might be the holy grail

https://www.youtube.com/watch?v=kpBXrsVg83Y&t=941s

Positives

- You lean on the power of dev containers while still using a portable spec

- You get access to nixpkgs which is arguably the most exhaustive package library

- You get the "true reproducibility" of nix over docker

Negatives

- Docker remains the king for ephemeral databases, more convoluted to manage with nix




I use devenv.sh and generate oci containers out of it, which give me kinda the best of both worlds!

(nobody in my team use vscode or devcontainers but enjoy using docker)


This is old, but wondering if you had any publicly available project setup this way. Thanks


Nix sounds like a great fit as well, but my experience with it has not been that great, and I feel it is not ideal for Python. I recently gave Flox a try, which simplifies the use of Nix. I use it from time to time, but it has not yet replaced my development environment.

In your case, is maintaining 2 dev env not annoying?


Sorry late reply,

Yes it is annoying to maintain 2 separate environments, but it's also not my end goal. A perfect solution for me would be a spec that is IDE agnostic, but also works as a VSCode dev container, all from a common source.

Maybe it's an unrealistic goal. But I've actually enjoyed trying and failing with nix so far, so it hasn't been too much of a burden.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: