|
| 1 | +// Adapted from https://github.com/xtruder/nix-devcontainer-python-jupyter/blob/main/.devcontainer/devcontainer.json |
| 2 | +// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at |
| 3 | +// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/docker-existing-dockerfile |
| 4 | +{ |
| 5 | + "name": "nix-devcontainer-homotopy-rs", |
| 6 | + "dockerFile": "Dockerfile", |
| 7 | + "context": "${localWorkspaceFolder}", |
| 8 | + "build": { |
| 9 | + "args": { |
| 10 | + "USER_UID": "${localEnv:USER_UID}", |
| 11 | + "USER_GID": "${localEnv:USER_GID}" |
| 12 | + }, |
| 13 | + }, |
| 14 | + |
| 15 | + "runArgs": [ |
| 16 | + "--security-opt", "label=disable" |
| 17 | + ], |
| 18 | + |
| 19 | + "mounts": [ |
| 20 | + "source=nix-devcontainer-homotopy-rs_nix,target=/nix,type=volume" |
| 21 | + ], |
| 22 | + |
| 23 | + "userEnvProbe": "loginShell", |
| 24 | + "overrideCommand": false, |
| 25 | + "updateRemoteUserUID": false, |
| 26 | + |
| 27 | + // build development environment on creation |
| 28 | + "onCreateCommand": "nix profile install nixpkgs#nix-direnv && ln -s $HOME/.nix-profile/share/nix-direnv/direnvrc $HOME/.direnvrc", |
| 29 | + |
| 30 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 31 | + "forwardPorts": [8080], |
| 32 | + |
| 33 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 34 | + // "postCreateCommand": "rustc --version", |
| 35 | +} |
0 commit comments