1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat: enable nvidia on laptop

This commit is contained in:
oddlama 2024-06-10 11:11:29 +02:00
parent a627d0c61e
commit 859e3d1771
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -1,5 +1,6 @@
{
inputs,
lib,
pkgs,
...
}: {
@ -12,6 +13,7 @@
../../config/hardware/intel.nix
../../config/hardware/physical.nix
../../config/hardware/bluetooth.nix
../../config/dev
../../config/graphical
@ -35,5 +37,35 @@
packages = [pkgs.terminus_font];
};
# FIXME: fuck optional modules and make this more adjustable via settings
graphical.gaming.enable = true;
boot.blacklistedKernelModules = ["nouveau"];
services.xserver.videoDrivers = lib.mkForce ["nvidia"];
hardware = {
nvidia = {
prime = {
offload.enable = true;
offload.enableOffloadCmd = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
modesetting.enable = true;
nvidiaPersistenced = true;
nvidiaSettings = true;
open = false;
powerManagement.enable = false;
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiVdpau
nvidia-vaapi-driver
];
};
};
topology.self.icon = "devices.laptop";
}