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;