Skip to content

Instantly share code, notes, and snippets.

@ddellacosta
Created February 28, 2019 21:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddellacosta/af4c0dd246842f206bd327ba38bcf7c1 to your computer and use it in GitHub Desktop.
Save ddellacosta/af4c0dd246842f206bd327ba38bcf7c1 to your computer and use it in GitHub Desktop.
graphics driver-specific bits in nix config
# ...
boot.extraModprobeConfig = ''
options i915 alpha_support=1
'';
hardware.nvidia = {
optimus_prime = {
enable = true;
nvidiaBusId = "PCI:1:0:0";
intelBusId = "PCI:0:2:0";
};
modesetting.enable = true;
};
# if we do not use optimus above (?)
# hardware.nvidiaOptimus.disable = true;
# hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
# hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
# On 64-bit systems, whether to support Direct Rendering for 32-bit
# applications (such as Wine). This is currently only supported for
# the nvidia and ati_unfree drivers, as well as Mesa.
hardware.opengl.driSupport32Bit = true;
services = {
xserver = {
# "intel" needs i915 alpha flag above
#videoDrivers = [ "intel" "nvidia" ];
videoDrivers = [ "nvidia" ];
};
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment