PortValhalla/scripts/Arch/Config/nvidia-dkms/install.sh

18 lines
406 B
Bash
Executable file

#!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null;
echo "MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)" | sudo tee /etc/mkinitcpio.conf.d/nvidia.conf > /dev/null;
sudo sed -i \
-e "/^HOOKS=(.* kms /{" \
-e "h; s/^/#/; p;" \
-e "g; s/ kms / /" \
-e "}" \
/etc/mkinitcpio.conf;
sudo mkinitcpio -P;
. "../../../Common/Config/nvidia-dkms/install.sh";
popd > /dev/null;