From 87798f132a27ea818dbd4510df95437ca06d7979 Mon Sep 17 00:00:00 2001 From: coja Date: Wed, 8 Apr 2026 01:19:50 +0200 Subject: [PATCH] [Opencode] bubblewrap --- .config/fish/functions/opencodes.fish | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .config/fish/functions/opencodes.fish diff --git a/.config/fish/functions/opencodes.fish b/.config/fish/functions/opencodes.fish new file mode 100644 index 0000000..0e0e1f5 --- /dev/null +++ b/.config/fish/functions/opencodes.fish @@ -0,0 +1,21 @@ +function opencodes --description 'bubblewraped opencode' + bwrap --unshare-all \ + --newsession \ + --clearenv \ + --die-with-parent \ + --share-net \ + --dev /dev \ + --proc /proc \ + --ro-bind /usr /usr \ + --ro-bind /lib /lib \ + --ro-bind /lib64 /lib64 \ + --ro-bind /bin /bin \ + --ro-bind /etc /etc \ + --ro-bind ~/.config/opencode ~/.config/opencode \ + --tmpfs /tmp/node-compile-cache \ + --bind ~/.local/state/opencode ~/.local/state/opencode \ + --bind ~/.local/share/opencode ~/.local/share/opencode \ + --bind "$(pwd)" "$(pwd)" \ + opencode +end +# strace -f -e trace=%file opencode