-
-
Save unode/a86ad712fbc698d71c847b89d8733c89 to your computer and use it in GitHub Desktop.
nvidia_only.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: | |
## This configuration forces exclusive use of NVIDIA in a laptop with NVIDIA+Intel GPUs | |
{ | |
imports = [ | |
# Include the base configuration which setups Intel as primary and NVIDIA through PRIME (primerun) | |
./configuration.nix | |
]; | |
services.xserver.videoDrivers = [ "nvidia" ]; | |
hardware = { | |
nvidia.optimus_prime = { | |
enable = true; | |
# Bus ID of the NVIDIA GPU. You can find it using lspci | |
nvidiaBusId = "PCI:1:0:0"; | |
# Bus ID of the Intel GPU. You can find it using lspci | |
intelBusId = "PCI:0:2:0"; | |
}; | |
# Also override the settings from configuration.nix | |
nvidiaOptimus.disable = false; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment