From 60799790e8068d00d24e6a7d02910c5bc15c6f16 Mon Sep 17 00:00:00 2001 From: TyleoDvDelaware3217 Date: Thu, 29 May 2025 04:18:47 +0200 Subject: [PATCH] Add_BetaNvidiaInstaller --- flatpacks/gaming_clients | 2 ++ flatpacks/uninstall_gaming_clients | 1 + install_nvidia_driver | 38 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 flatpacks/uninstall_gaming_clients create mode 100644 install_nvidia_driver diff --git a/flatpacks/gaming_clients b/flatpacks/gaming_clients index e69de29..16f5b91 100644 --- a/flatpacks/gaming_clients +++ b/flatpacks/gaming_clients @@ -0,0 +1,2 @@ +sudo nala update +sudo nala install steam-installer lutris -y \ No newline at end of file diff --git a/flatpacks/uninstall_gaming_clients b/flatpacks/uninstall_gaming_clients new file mode 100644 index 0000000..20d644a --- /dev/null +++ b/flatpacks/uninstall_gaming_clients @@ -0,0 +1 @@ +sudo nala remove steam-installer -y \ No newline at end of file diff --git a/install_nvidia_driver b/install_nvidia_driver new file mode 100644 index 0000000..6b5326b --- /dev/null +++ b/install_nvidia_driver @@ -0,0 +1,38 @@ +#!/bin/bash + +# Ensure the script is run as root +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root. Try: sudo $0" + exit 1 +fi + +# Update and upgrade the system +echo "Updating system..." +apt update && apt upgrade -y + +# Install necessary dependencies +echo "Installing required packages..." +apt install -y build-essential dkms linux-headers-$(uname -r) + +# Detect and install NVIDIA driver +echo "Detecting GPU model..." +apt install -y pciutils +GPU_MODEL=$(lspci | grep -i NVIDIA) + +if [[ -z "$GPU_MODEL" ]]; then + echo "No NVIDIA GPU detected. Exiting..." + exit 1 +fi + +echo "Installing NVIDIA driver..." +apt install -y nvidia-driver + +# Reboot prompt +echo "Installation complete! A system reboot is recommended." +read -p "Do you want to reboot now? (y/n) " REBOOT + +if [[ "$REBOOT" == "y" ]]; then + reboot +fi + +exit 0