Compare commits
2 Commits
2c794e365f
...
984018cfc9
Author | SHA1 | Date | |
---|---|---|---|
984018cfc9
|
|||
1800320e47
|
32
dot_local/bin/executable_bwrap_tool.sh
Normal file
32
dot_local/bin/executable_bwrap_tool.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# See: https://news.ycombinator.com/item?id=45034496
|
||||
|
||||
bin=$(basename "$0")
|
||||
|
||||
echo "==========================="
|
||||
echo "Wrapping $bin in bubblewrap"
|
||||
echo "==========================="
|
||||
|
||||
exec bwrap \
|
||||
--bind ~/.cache ~/.cache \
|
||||
--bind "${PWD}" "${PWD}" \
|
||||
--dev /dev \
|
||||
--die-with-parent \
|
||||
--disable-userns \
|
||||
--new-session \
|
||||
--proc /proc \
|
||||
--ro-bind /etc/ca-certificates /etc/ca-certificates \
|
||||
--ro-bind /etc/resolv.conf /etc/resolv.conf \
|
||||
--ro-bind /etc/ssl /etc/ssl \
|
||||
--ro-bind /usr /usr \
|
||||
--setenv PATH /usr/bin \
|
||||
--symlink /usr/bin /bin \
|
||||
--symlink /usr/bin /sbin \
|
||||
--symlink /usr/lib /lib \
|
||||
--symlink /usr/lib64 /lib64 \
|
||||
--tmpfs /tmp \
|
||||
--unshare-all \
|
||||
--unshare-user \
|
||||
--share-net \
|
||||
/usr/bin/env "$bin" "$@"
|
1
dot_local/bin/symlink_npm
Normal file
1
dot_local/bin/symlink_npm
Normal file
@@ -0,0 +1 @@
|
||||
/home/aorth/.local/bin/bwrap_tool.sh
|
1
dot_local/bin/symlink_yarn
Normal file
1
dot_local/bin/symlink_yarn
Normal file
@@ -0,0 +1 @@
|
||||
/home/aorth/.local/bin/bwrap_tool.sh
|
3
dot_mise.toml
Normal file
3
dot_mise.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[env]
|
||||
# prepend PATH with local one so we can use npm wrapper (bwrap)
|
||||
_.path = ["~/.local/bin"]
|
Reference in New Issue
Block a user