diff --git a/migrations/1783625095.sh b/migrations/1783625095.sh new file mode 100644 index 0000000000..d3c4cd916a --- /dev/null +++ b/migrations/1783625095.sh @@ -0,0 +1,19 @@ +echo "Backfill Mesa Vulkan drivers for systems installed before vulkan.sh was added" + +declare -A VULKAN_DRIVERS=( + [Intel]=vulkan-intel + [AMD]=vulkan-radeon + [Apple]=vulkan-asahi +) + +PACKAGES=() + +for vendor in "${!VULKAN_DRIVERS[@]}"; do + if lspci | grep -iE "(VGA|Display).*$vendor" > /dev/null; then + PACKAGES+=("${VULKAN_DRIVERS[$vendor]}") + fi +done + +if (( ${#PACKAGES[@]} > 0 )); then + omarchy-pkg-add "${PACKAGES[@]}" +fi