dotfiles/modules/graphics/default.nix

27 lines
725 B
Nix
Raw Normal View History

2024-07-18 21:56:00 +00:00
{ lib, config, pkgs, ... }:
{
config = {
# TODO: Modularize further, especially modesetting should be its own module.
# Set up graphics
hardware.graphics.enable32Bit = true;
hardware.graphics.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
};
}