From 92f28f040ac0b4c409ee17ca3e76a008a38506fb Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 19 Feb 2024 11:38:36 +0100 Subject: [PATCH] Remove the nixos-hardware nvidia option Since I use locally set options as well it is very confusing to understand where the settings are coming from. --- modules/hardware/nvidia/default.nix | 15 ++++++++++++--- systems/gwyn/default.nix | 1 - 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/hardware/nvidia/default.nix b/modules/hardware/nvidia/default.nix index 9fcd8da..199f6bc 100644 --- a/modules/hardware/nvidia/default.nix +++ b/modules/hardware/nvidia/default.nix @@ -1,4 +1,9 @@ -{ config, lib, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.hardware.az-nvidia; in @@ -13,13 +18,17 @@ in XDG_DATA_HOME = "$HOME/.local/share"; }; }; - + services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; + hardware.opengl.extraPackages = [ pkgs.vaapiVdpau ]; hardware.nvidia.prime = { # Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA intelBusId = "PCI:00:02:0"; - # Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA nvidiaBusId = "PCI:01:00:0"; + offload = { + enable = true; + enableOffloadCmd = true; + }; }; }; } diff --git a/systems/gwyn/default.nix b/systems/gwyn/default.nix index 628ba85..4d15036 100644 --- a/systems/gwyn/default.nix +++ b/systems/gwyn/default.nix @@ -8,7 +8,6 @@ { imports = [ inputs.nixos-hardware.nixosModules.dell-precision-5530 - inputs.nixos-hardware.nixosModules.common-gpu-nvidia inputs.nixos-hardware.nixosModules.common-gpu-intel ]; boot.initrd.availableKernelModules = [