summaryrefslogtreecommitdiffstats
path: root/modules/hardware
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-09-17 21:03:44 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-09-17 21:03:44 -0400
commitc2ac689be0b8a26b4b5ec118bc6bc9adcb55800a (patch)
tree776b5db4c44b325dc4f2efe1910c4c1228338052 /modules/hardware
parentb4ffcbe13301291e0d04169a9ac0377d52621c4f (diff)
downloadnix-config-c2ac689be0b8a26b4b5ec118bc6bc9adcb55800a.tar.gz
nix-config-c2ac689be0b8a26b4b5ec118bc6bc9adcb55800a.tar.bz2
nix-config-c2ac689be0b8a26b4b5ec118bc6bc9adcb55800a.zip
update wayland and nvidia settings; update nvim configsHEADmaster
Diffstat (limited to 'modules/hardware')
-rw-r--r--modules/hardware/gpu.nix35
1 files changed, 20 insertions, 15 deletions
diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix
index fd696ab..bb8b831 100644
--- a/modules/hardware/gpu.nix
+++ b/modules/hardware/gpu.nix
@@ -17,10 +17,8 @@ in {
config = lib.mkIf (gpuConfig.enable) (lib.mkMerge [
{
- hardware.opengl = {
+ hardware.graphics = {
enable = true;
- driSupport = true;
- driSupport32Bit = true;
};
}
(lib.mkIf (device.gpu == "intel") {
@@ -38,24 +36,31 @@ in {
environment.variables.VDPAU_DRIVER = "va_gl";
})
(lib.mkIf (device.gpu == "nvidia") {
+ boot = {
+ extraModulePackages = [
+ config.boot.kernelPackages.nvidia_x11_beta
+ ];
+ initrd.kernelModules = [
+ "nvidia"
+ "nvidia_modeset"
+ "nvidia_uvm"
+ "nvidia_drm"
+ ];
+ blacklistedKernelModules = [ "nouveau" ];
+ };
+
+ environment.systemPackages = with pkgs; [
+ pkgs.nvidia-vaapi-driver
+ ];
+
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
- powerManagement.enable = false;
- powerManagement.finegrained = false;
+ powerManagement.enable = true;
open = false;
nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.production;
+ package = config.boot.kernelPackages.nvidiaPackages.beta;
};
- boot.initrd.kernelModules = [
- "nvidia"
- "nvidia_modeset"
- "nvidia_uvm"
- "nvidia_drm"
- ];
- boot.extraModprobeConfig = ''
- options nvidia-drm modeset=1
- '';
})
]);
}