devenv
devenv copied to clipboard
Share nix store with devenv devcontainer?
I was trying out the the .devcontainer.json
interop, and am wondering if sharing the host nix store is possible. It would save some bandwidth/disk space (and, most important, time!), and using the devenv devcontainer as base for all my projects would be cool.
Does devcontainer support mounting? If so, yes :)
Yep, devcontainers should support mounting.
I've made some progress wrt mounting the store:
$ docker run --entrypoint bash --mount='source=/nix,target=/nix,readonly,type=bind' -e 'NIX_REMOTE=daemon' --rm -ti ghcr.io/cachix/devenv:latest
Seems to work properly, but not clear to me if I'm risking breaking things. Didn't yet plug that into the .devcontainer.json
, will be trying that once I have time to tinker again.