From 9c8c789453650b3049b0f94df3abc486b4c2bda6 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sat, 27 Dec 2025 21:05:45 -0500 Subject: [PATCH] Simplify this check --- install/config/hardware/nvidia.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/install/config/hardware/nvidia.sh b/install/config/hardware/nvidia.sh index 8b38b19b..e8c4e709 100644 --- a/install/config/hardware/nvidia.sh +++ b/install/config/hardware/nvidia.sh @@ -12,17 +12,7 @@ NVIDIA="$(lspci | grep -i 'nvidia')" # --- GPU Detection --- if [ -n "$NVIDIA" ]; then # Check which kernel is installed and set appropriate headers package - KERNEL_HEADERS="linux-headers" # Default - if pacman -Q linux-zen &>/dev/null; then - KERNEL_HEADERS="linux-zen-headers" - elif pacman -Q linux-lts &>/dev/null; then - KERNEL_HEADERS="linux-lts-headers" - elif pacman -Q linux-hardened &>/dev/null; then - KERNEL_HEADERS="linux-hardened-headers" - fi - - # force package database refresh - sudo pacman -Syu --noconfirm + KERNEL_HEADERS="$(pacman -Qqs '^linux(-zen|-lts|-hardened)?$' | head -1)-headers" # Initial install packages GENERAL_PACKAGES=(