2024-04-28 11:35:35 +02:00
|
|
|
{ pkgs
|
|
|
|
, config
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# nvidia package to patch
|
|
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
hardware.opengl = {
|
|
|
|
enable = true;
|
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
|
|
|
};
|
|
|
|
|
2024-12-05 07:02:26 +01:00
|
|
|
hardware.nvidia = { };
|
|
|
|
|
2024-04-28 11:35:35 +02:00
|
|
|
# TODO fix hybrid optimus shit mode... add "intel" for inner display to work
|
2024-12-05 07:02:26 +01:00
|
|
|
services.xserver.videoDrivers = [ "nvidia" "intel" ];
|
2024-04-28 11:35:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
nixpkgs.config.cudaSupport = true;
|
|
|
|
hardware.nvidia = {
|
|
|
|
modesetting.enable = true;
|
|
|
|
prime =
|
|
|
|
{
|
|
|
|
sync.enable = false;
|
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
|
|
intelBusId = "PCI:0:2:0";
|
|
|
|
};
|
|
|
|
|
|
|
|
powerManagement.enable = false;
|
|
|
|
powerManagement.finegrained = false;
|
|
|
|
open = false;
|
|
|
|
nvidiaSettings = true;
|
|
|
|
package = pkgs.nvidia-patch.patch-nvenc (pkgs.nvidia-patch.patch-fbc package);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|