PortValhalla/scripts/Arch/Software/nvidia-dkms/main.fish

30 lines
788 B
Fish
Executable file

#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
inherit "$dir/../../../Common/Software/nvidia-dkms/main.fish"
function installSW
yayinst \
nvidia-beta-dkms \
lib32-nvidia-utils-beta
end
function configureSW -V dir
begin
printf %s\n \
"MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)" \
"" \
'for i in "${!HOOKS[@]}"; do' \
' if [ "${HOOKS[i]}" = "kms" ]; then' \
' unset "HOOKS[i]"' \
" fi" \
done
end | sudo tee /etc/mkinitcpio.conf.d/nvidia.conf >/dev/null
configureSWBase $argv
end
runInstaller $argv
end