Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do the same. Codex manages a per project flake.nix and uses `nix develop` for all testing. nix-direnv for my own convenience. I generally have it generate dockerfiles or other deployment assets at some point.

Codex is way better at nix than I am.



If you generate Dockerfiles using Nix code, how do you build and run those images? Docker?

I use NixOS on my self-hosted CI runners, and I generate the OCI image using Nix via pkgs.dockerTools:

https://git.shine.town/infra/runners/src/branch/main/nix/nix...

It has nothing to do with Docker as such, it's just named that.

https://nix.dev/tutorials/nixos/building-and-running-docker-...


Nix isn't involved in my container images. I just take the dependencies and env vars from the flake and generate a dockerfile.

Guess I need to try out dockerTools. That looks really convenient. Thanks!




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

Search: