nix-devcontainer icon indicating copy to clipboard operation
nix-devcontainer copied to clipboard

Document suitable onCreateCommand for nix.flake on README

Open vorburger opened this issue 3 months ago • 1 comments

https://github.com/xtruder/nix-devcontainer#devcontainer-integration currently documents:

 // build development environment on creation, make sure you already have shell.nix
  "onCreateCommand": "nix-shell --command 'echo done building nix dev environment'",

For repos which instead of a shell.nix contain a flake.nix (e.g. like this one; for [my] https://github.com/enola-dev/enola/issues/1921), this probably needs to be another command?

It would be awesome if the README documented that.

I'll see if I can figure it out, and contrib a PR.

vorburger avatar Nov 23 '25 08:11 vorburger

I'll try:

"onCreateCommand": "nix develop --command bash -c 'echo done building nix dev environment'"

vorburger avatar Nov 23 '25 08:11 vorburger