dotfiles/void-install/install-root.sh

24 lines
875 B
Bash
Raw Permalink Normal View History

#!/bin/sh
2022-06-09 18:22:03 +02:00
# install per-user-runsvdir in ~/sv
# drop available services in ~/.config/sv
# and link to ~/sv to enable them
2023-05-23 10:03:44 +02:00
zuser=
[ -z "$zuser" ] && echo "User is not set, please edit the script accordingly." && exit 1
2023-05-23 10:03:44 +02:00
install -d /etc/sv/runsvdir-$zuser
install -m755 sv/runsvdir/run /etc/sv/runsvdir-$zuser/run
sed -i -e "s/\@USER\@/$zuser/g" /etc/sv/runsvdir-$zuser/run
install -m755 sv/runsvdir/finish /etc/sv/runsvdir-$zuser/finish
sed -i -e "s/\@USER\@/$zuser/g" /etc/sv/runsvdir-$zuser/finish
ln -sf /run/runit/supervise.runsvdir-$zuser /etc/sv/runsvdir-$zuser/supervise
2023-08-07 12:44:39 +02:00
# force-enable Wayland on nvidia GPUs
ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
2023-09-11 09:56:54 +02:00
# Set ulimit and vm.max_map_count
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
echo "$zuser hard nofile 524288" >> /etc/security/limits.conf
echo "$zuser soft nofile 524288" >> /etc/security/limits.conf