Revised code
# ========================================
# 🖼️ NVIDIA GPU Support
# ========================================
# NVIDIA drivers are proprietary, but NixOS makes them easy to install.
# These are required for hardware acceleration and optimal performance.
# 🔍 Tip: Not sure which NVIDIA driver version you need? Some cards require legacy drivers.
# You can find detailed, card-specific info on the NixOS Wiki:
# https://wiki.nixos.org/wiki/NVIDIA
#
# The basic setup below enables the current NVIDIA drivers and provides a GUI settings panel.
# 💡 If you're using an NVIDIA GPU, uncomment this block and comment out the AMD/Intel one above.
# ✅ Basic setup — uncomment to enable NVIDIA drivers
# hardware.nvidia.enable = true;
# hardware.nvidia.nvidiaSettings = true;
# 💡 Requirement: Nvidia Open Source Driver.
# If in doubt check the Wiki https://wiki.nixos.org/wiki/NVIDIA
# Newer cards may need this to be true:
# hardware.nvidia.open = true; # Newer GPU
# Older cards need that to be false:
# hardware.nvidia.open = false; # Older GPU
# ✅ Optional: Enable 32-bit libraries (needed for older apps and games)
# hardware.graphics.enable32Bit = true;
# ✅ Optional: Enable NVIDIA's built-in modesetting
# ⚠️ Do NOT enable this if you're using an Optimus (hybrid graphics) system
# hardware.nvidia.modesetting.enable = true;