54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{config, lib, pkgs, ...}: {
|
|
programs.steam = {
|
|
enable = true;
|
|
};
|
|
|
|
hardware.opengl = {
|
|
enable = true;
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
};
|
|
|
|
services.xserver.videoDrivers = ["nvidia"];
|
|
|
|
hardware.nvidia = {
|
|
# Modesetting is required.
|
|
modesetting.enable = true;
|
|
|
|
powerManagement.enable = false;
|
|
powerManagement.finegrained = false;
|
|
|
|
open = false;
|
|
|
|
nvidiaSettings = true;
|
|
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
};
|
|
|
|
# boot.initrd.kernelModules = [ "nvidia" ];
|
|
boot.extraModulePackages = [
|
|
config.boot.kernelPackages.nvidia_x11
|
|
];
|
|
|
|
hardware.nvidia.prime = {
|
|
offload = {
|
|
enable = true;
|
|
enableOffloadCmd = true;
|
|
};
|
|
# Make sure to use the correct Bus ID values for your system!
|
|
amdgpuBusId = "PCI:193:0:0";
|
|
nvidiaBusId = "PCI:100:0:0";
|
|
};
|
|
|
|
specialisation = {
|
|
gaming.configuration = {
|
|
system.nixos.tags = [ "gaming" ];
|
|
hardware.nvidia = {
|
|
prime.offload.enable = lib.mkForce false;
|
|
prime.offload.enableOffloadCmd = lib.mkForce false;
|
|
prime.sync.enable = lib.mkForce true;
|
|
};
|
|
};
|
|
};
|
|
}
|