summaryrefslogtreecommitdiff
path: root/sand
diff options
context:
space:
mode:
authortslilc <tslil@posteo.de>2026-03-17 10:20:25 +0000
committertslilc <tslil@posteo.de>2026-03-17 10:20:25 +0000
commit6fae5c16f07fe9ca5acb273e5c4b1d648ed6fcd9 (patch)
tree6329ceec4b709bc8b7f188b7e159fe2d96cad37f /sand
parent4ccfc6e2fd4b5ef445b883c03b3be8c911286bdc (diff)
sand: rework old soc script
Diffstat (limited to 'sand')
-rwxr-xr-xsand38
1 files changed, 38 insertions, 0 deletions
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