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

28 lines
772 B
Fish
Executable file

#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.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
fish "$dir/../../../Common/Software/nvidia-dkms/main.fish" configure
end
runInstaller $argv
end