From 6fae5c16f07fe9ca5acb273e5c4b1d648ed6fcd9 Mon Sep 17 00:00:00 2001 From: tslilc Date: Tue, 17 Mar 2026 10:20:25 +0000 Subject: sand: rework old soc script --- sand | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 sand (limited to 'sand') diff --git a/sand b/sand new file mode 100755 index 0000000..1af0423 --- /dev/null +++ b/sand @@ -0,0 +1,38 @@ +#!/usr/bin/env sh + +if [ -z "$1" ]; then + echo "Must provide a project directory to mount" + exit 1 +fi; + +bwrap \ + --ro-bind /usr /usr \ + --ro-bind /lib /lib \ + --ro-bind /lib64 /lib64 \ + --ro-bind /bin /bin \ + --ro-bind /etc/ssl /etc/ssl \ + --ro-bind /etc/ca-certificates /etc/ca-certificates \ + --ro-bind /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf \ + --dev /dev \ + --proc /proc \ + --tmpfs /home/$(whoami) \ + --tmpfs /tmp \ + --bind ~/.config/opencode /home/$(whoami)/.config/opencode \ + --bind ~/.local/state/opencode /home/$(whoami)/.local/state/opencode \ + --bind ~/.local/share/opencode /home/$(whoami)/.local/share/opencode \ + --bind ~/.local/share/uv/ /home/$(whoami)/.local/share/uv \ + --bind ~/.vibe /home/$(whoami)/.vibe \ + --bind ~/.cache/uv /home/$(whoami)/.cache/uv \ + --bind ~/.cache/huggingface /home/$(whoami)/.cache/huggingface \ + --bind ~/.cache/opencode /home/$(whoami)/.cache/opencode \ + --bind ~/.local/bin/vibe /home/$(whoami)/.local/bin/vibe \ + --bind ~/.cargo /home/$(whoami)/.cargo \ + --bind ~/.rustup /home/$(whoami)/.rustup \ + --clearenv \ + --setenv HOME /home/$(whoami) \ + --setenv USER $(whoami) \ + --setenv SHELL /bin/bash \ + --setenv PATH /home/$(whoami)/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin \ + --bind "$1" /home/$(whoami)/project/ \ + --chdir /home/$(whoami)/project/ \ + bash -- cgit v1.2.3