dotfiles/modules/graphics/default.nix

33 lines
736 B
Nix
Raw Normal View History

2024-07-19 12:00:55 +00:00
{
lib,
config,
pkgs,
...
}:
2024-07-18 21:56:00 +00:00
{
config = {
# TODO: Modularize further, especially modesetting should be its own module.
# Set up graphics
hardware.graphics.enable32Bit = true;
hardware.graphics.enable = true;
2024-07-19 12:00:55 +00:00
services.xserver.videoDrivers = [ "nvidia" ];
2024-07-18 21:56:00 +00:00
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;
};
};
};
};
2024-07-19 12:00:55 +00:00
}