Skip to content

Instantly share code, notes, and snippets.

@ddellacosta

ddellacosta/configuration.nix Secret

Created Feb 28, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.