Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM nixos/nix

WORKDIR /autonomy
COPY tools/nix ./tools/nix

RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf \
&& echo "sandbox = relaxed" >> /etc/nix/nix.conf \
&& echo "filter-syscalls = false" >> /etc/nix/nix.conf \
&& echo "download-buffer-size = 268435456" >> /etc/nix/nix.conf \
&& nix-channel --update \
&& nix develop ./tools/nix --command echo "Nix environment built and cached" \
&& mkdir -p /root/.local/bin \
&& mkdir -p /root/.cache

COPY . .

CMD ["nix", "develop", "./tools/nix", "--command", "bash"]
9 changes: 7 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "Autonomy Builder",
"image": "ghcr.io/build-trust/autonomy-builder"
"name": "Builder",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"workspaceFolder": "/autonomy",
"overrideCommand": false
}
1 change: 1 addition & 0 deletions .github/actions/setup_nix/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ runs:

sudo mkdir -p /etc/nix
echo "extra-experimental-features = flakes nix-command" > nix.conf
echo "download-buffer-size = 268435456" >> nix.conf
sudo mv nix.conf /etc/nix/nix.conf

# Restore nix directories from cache
Expand Down
1 change: 1 addition & 0 deletions tools/docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ COPY tools/nix ./tools/nix
RUN echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf \
&& echo "sandbox = relaxed" >> /etc/nix/nix.conf \
&& echo "filter-syscalls = false" >> /etc/nix/nix.conf \
&& echo "download-buffer-size = 268435456" >> /etc/nix/nix.conf \
&& nix-channel --update \
&& nix develop ./tools/nix --command echo "Nix environment built and cached" \
&& mkdir -p /root/.local/bin \
Expand Down