diff --git a/etc/systemd/nspawn/20-machines-profile.sh b/etc/systemd/nspawn/20-machines-profile.sh new file mode 100755 index 0000000..d8df738 --- /dev/null +++ b/etc/systemd/nspawn/20-machines-profile.sh @@ -0,0 +1,5 @@ +export DISPLAY=":0.0" +export LC_ALL="en_US.UTF-8" +export PULSE_SERVER="/tmp/snr_PULSE_SERVER" +# Fix Qt4 GUIs ("invalid Pixmap or Window parameter") +export QT_X11_NO_MITSHM=1 diff --git a/etc/systemd/nspawn/ArchLinux.nspawn b/etc/systemd/nspawn/ArchLinux.nspawn new file mode 100644 index 0000000..b784982 --- /dev/null +++ b/etc/systemd/nspawn/ArchLinux.nspawn @@ -0,0 +1,16 @@ +[Exec] +Boot=true +Capability=CAP_NET_ADMIN + +[Files] +Bind=/dev/dri +Bind=/dev/shm +Bind=/dev/snd +Bind=/dev/nvidia0 +Bind=/dev/nvidiactl +Bind=/dev/nvidia-modeset +Bind=/dev/nvidia-uvm +Bind=/dev/nvidia-uvm-tools +Bind=/run/user/1000/pulse/native:/tmp/pulse_server +Bind=/etc/systemd/nspawn/20-machines-profile.sh:/etc/profile.d/20-machines-profile.sh +BindReadOnly=/tmp/.X11-unix diff --git a/etc/systemd/nspawn/BlackArch.nspawn b/etc/systemd/nspawn/BlackArch.nspawn new file mode 100644 index 0000000..b784982 --- /dev/null +++ b/etc/systemd/nspawn/BlackArch.nspawn @@ -0,0 +1,16 @@ +[Exec] +Boot=true +Capability=CAP_NET_ADMIN + +[Files] +Bind=/dev/dri +Bind=/dev/shm +Bind=/dev/snd +Bind=/dev/nvidia0 +Bind=/dev/nvidiactl +Bind=/dev/nvidia-modeset +Bind=/dev/nvidia-uvm +Bind=/dev/nvidia-uvm-tools +Bind=/run/user/1000/pulse/native:/tmp/pulse_server +Bind=/etc/systemd/nspawn/20-machines-profile.sh:/etc/profile.d/20-machines-profile.sh +BindReadOnly=/tmp/.X11-unix diff --git a/etc/systemd/nspawn/Debian.nspawn b/etc/systemd/nspawn/Debian.nspawn new file mode 100644 index 0000000..b784982 --- /dev/null +++ b/etc/systemd/nspawn/Debian.nspawn @@ -0,0 +1,16 @@ +[Exec] +Boot=true +Capability=CAP_NET_ADMIN + +[Files] +Bind=/dev/dri +Bind=/dev/shm +Bind=/dev/snd +Bind=/dev/nvidia0 +Bind=/dev/nvidiactl +Bind=/dev/nvidia-modeset +Bind=/dev/nvidia-uvm +Bind=/dev/nvidia-uvm-tools +Bind=/run/user/1000/pulse/native:/tmp/pulse_server +Bind=/etc/systemd/nspawn/20-machines-profile.sh:/etc/profile.d/20-machines-profile.sh +BindReadOnly=/tmp/.X11-unix diff --git a/etc/systemd/nspawn/KaliLinux.nspawn b/etc/systemd/nspawn/KaliLinux.nspawn new file mode 100644 index 0000000..b784982 --- /dev/null +++ b/etc/systemd/nspawn/KaliLinux.nspawn @@ -0,0 +1,16 @@ +[Exec] +Boot=true +Capability=CAP_NET_ADMIN + +[Files] +Bind=/dev/dri +Bind=/dev/shm +Bind=/dev/snd +Bind=/dev/nvidia0 +Bind=/dev/nvidiactl +Bind=/dev/nvidia-modeset +Bind=/dev/nvidia-uvm +Bind=/dev/nvidia-uvm-tools +Bind=/run/user/1000/pulse/native:/tmp/pulse_server +Bind=/etc/systemd/nspawn/20-machines-profile.sh:/etc/profile.d/20-machines-profile.sh +BindReadOnly=/tmp/.X11-unix diff --git a/etc/systemd/nspawn/ParrotSec.nspawn b/etc/systemd/nspawn/ParrotSec.nspawn new file mode 100644 index 0000000..b784982 --- /dev/null +++ b/etc/systemd/nspawn/ParrotSec.nspawn @@ -0,0 +1,16 @@ +[Exec] +Boot=true +Capability=CAP_NET_ADMIN + +[Files] +Bind=/dev/dri +Bind=/dev/shm +Bind=/dev/snd +Bind=/dev/nvidia0 +Bind=/dev/nvidiactl +Bind=/dev/nvidia-modeset +Bind=/dev/nvidia-uvm +Bind=/dev/nvidia-uvm-tools +Bind=/run/user/1000/pulse/native:/tmp/pulse_server +Bind=/etc/systemd/nspawn/20-machines-profile.sh:/etc/profile.d/20-machines-profile.sh +BindReadOnly=/tmp/.X11-unix