diff --git a/hardware/gpu/cuda.nix b/hardware/gpu/cuda.nix index 7d80141..f7e8cf3 100644 --- a/hardware/gpu/cuda.nix +++ b/hardware/gpu/cuda.nix @@ -63,6 +63,7 @@ lib.mkMerge [ #hardware.nvidia.powerManagement.enable = lib.mkDefault true; # Fix graphical corruption on suspend/resume #hardware.nvidia.powerManagement.finegrained = lib.mkDefault false; # Turns off GPU when not in use, Turing or newer + # https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/ # https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; diff --git a/hardware/gpu/intel.nix b/hardware/gpu/intel.nix index d4cb8a1..8a3caef 100644 --- a/hardware/gpu/intel.nix +++ b/hardware/gpu/intel.nix @@ -1,4 +1,6 @@ { config, pkgs, lib, ... }: +lib.mkMerge [ + { # enable opengl (headless) @@ -18,7 +20,11 @@ }; hardware.opengl.enable = true; +} +(lib.optionalAttrs (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") { hardware.opengl.driSupport = true; +}) +{ hardware.opengl.extraPackages = with pkgs; [ mesa.drivers intel-media-driver @@ -34,3 +40,4 @@ (pkgs.nvtopPackages.intel or pkgs.nvtop-intel) ]; } +] diff --git a/profiles/desktop/lutris.nix b/profiles/desktop/lutris.nix index c8b1ff6..8e127f4 100644 --- a/profiles/desktop/lutris.nix +++ b/profiles/desktop/lutris.nix @@ -1,4 +1,5 @@ { config, pkgs, lib, ... }: +lib.mkMerge [ { # TODO: gamemode? @@ -19,7 +20,7 @@ }) # ensure icons appear - pkgs.gnome3.adwaita-icon-theme + pkgs.gnome.adwaita-icon-theme pkgs.hicolor-icon-theme # # Needed for some installers like League of Legends @@ -29,8 +30,13 @@ ]; hardware.opengl.enable = true; - hardware.opengl.driSupport = true; +} +(lib.optionalAttrs (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") { + hardware.opengl.driSupport = true; +}) +{ hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; } +] diff --git a/profiles/desktop/steam.nix b/profiles/desktop/steam.nix index 385fce6..cc0a3db 100644 --- a/profiles/desktop/steam.nix +++ b/profiles/desktop/steam.nix @@ -1,4 +1,5 @@ { config, pkgs, lib, ... }: +lib.mkMerge [ { programs.steam.enable = true; programs.steam.remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play @@ -66,7 +67,11 @@ #services.joycond.enable = true; hardware.opengl.enable = true; - hardware.opengl.driSupport = true; +} +(lib.optionalAttrs (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") { + hardware.opengl.driSupport = true; +}) +{ hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; @@ -94,3 +99,4 @@ ]; } +]