-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsandbox-HMCL
34 lines (34 loc) · 1.13 KB
/
sandbox-HMCL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/zsh
echo $*|xargs bwrap \
--tmpfs "${HOME}" \
--bind "${PWD}" "${PWD}" \
--tmpfs "${PWD}"/logs \
--tmpfs "${PWD}"/null \
--ro-bind /usr /usr \
--ro-bind /lib /lib \
--ro-bind /lib64 /lib64 \
--bind "${HOME}"/.hmcl "${HOME}"/.hmcl \
--bind "${HOME}"/.minecraft "${HOME}"/.minecraft \
--tmpfs /usr/lib/systemd \
--tmpfs /tmp \
--ro-bind /tmp/.X11-unix/ /tmp/.X11-unix/ \
--ro-bind /bin /bin \
--ro-bind /var/lib/ca-certificates/java-cacerts /var/lib/ca-certificates/java-cacerts \
--ro-bind /etc /etc \
--bind "${HOME}"/.local/share/hmcl "${HOME}"/.local/share/hmcl \
--dev /dev \
--proc /proc \
--unshare-all \
--die-with-parent \
--ro-bind "${XDG_RUNTIME_DIR}" "${XDG_RUNTIME_DIR}" \
--dev-bind /dev/video0 /dev/video0 \
--dev-bind /dev/dri /dev/dri \
--dev-bind /dev/nvidia0 /dev/nvidia0 \
--dev-bind /dev/nvidiactl /dev/nvidiactl \
--dev-bind /dev/nvidia-uvm /dev/nvidia-uvm \
--dev-bind /dev/nvidia-uvm-tools /dev/nvidia-uvm-tools \
--dev-bind /dev/nvidia-modeset /dev/nvidia-modeset \
--share-net \
--ro-bind /sys/dev/char /sys/dev/char \
--setenv WAYLAND_DISPLAY "${WAYLAND_DISPLAY}" \
--setenv XDG_RUNTIME_DIR "${XDG_RUNTIME_DIR}" \