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

31 lines
801 B
Fish
Raw Normal View History

2024-09-20 00:01:22 +00:00
#!/bin/env fish
begin
set -l dir (status dirname)
2024-11-01 12:12:16 +00:00
source "$dir/../../lib/software.fish"
inherit "$dir/../../../Common/Software/nvidia-dkms/main.fish"
2024-09-20 00:01:22 +00:00
function installSW
yayinst \
nvidia-dkms \
nvidia-utils \
lib32-nvidia-utils
2024-09-20 00:01:22 +00:00
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" \
2024-10-06 19:25:34 +00:00
done
end | sudo tee /etc/mkinitcpio.conf.d/nvidia.conf >/dev/null
2024-09-20 00:01:22 +00:00
configureSWBase $argv
2024-09-20 00:01:22 +00:00
end
runInstaller $argv
end