From f8b601e99720546138268b9c161961a6d4694034 Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Sun, 15 Mar 2026 17:48:58 +0000 Subject: soc: a bubblewrap script to isolate opencode --- soc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 soc diff --git a/soc b/soc new file mode 100755 index 0000000..b47d31e --- /dev/null +++ b/soc @@ -0,0 +1,27 @@ +#!/usr/bin/env sh + +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 ~/.cache/uv /home/$(whoami)/.cache/uv \ + --bind ~/.cache/huggingface /home/$(whoami)/.cache/huggingface \ + --bind ~/.cache/opencode /home/$(whoami)/.cache/opencode \ + --bind ~/code/workspace /home/$(whoami)/project \ + --clearenv \ + --setenv HOME /home/$(whoami) \ + --setenv USER $(whoami) \ + --setenv SHELL /bin/bash \ + --chdir /home/$(whoami)/project \ + bash -- cgit v1.2.3