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

29 lines
772 B
Fish
Raw Normal View History

2024-09-20 00:01:22 +00:00
#!/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