nixos-configuration/nix-os/nvidia.nix

29 lines
919 B
Nix
Raw Normal View History

2023-12-12 00:48:10 +01:00
{ config, lib, pkgs, ...}:
{
hardware.graphics = {
2023-12-12 00:48:10 +01:00
enable = true;
enable32Bit = true;
2023-12-12 00:48:10 +01:00
};
# Workaround for nvidia driver ghost display
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
2023-12-12 00:48:10 +01:00
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
2024-12-22 16:37:52 +01:00
version = "565.77";
sha256_64bit = "sha256-CnqnQsRrzzTXZpgkAtF7PbH9s7wbiTRNcM0SPByzFHw=";
sha256_aarch64 = "sha256-LSAYUnhfnK3rcuPe1dixOwAujSof19kNOfdRHE7bToE=";
openSha256 = "sha256-Fxo0t61KQDs71YA8u7arY+503wkAc1foaa51vi2Pl5I=";
settingsSha256 = "sha256-VUetj3LlOSz/LB+DDfMCN34uA4bNTTpjDrb6C6Iwukk=";
persistencedSha256 = "sha256-wnDjC099D8d9NJSp9D0CbsL+vfHXyJFYYgU3CwcqKww=";
2024-06-05 16:20:06 +02:00
};
2023-12-12 00:48:10 +01:00
};
2024-06-05 16:20:06 +02:00
nixpkgs.config.nvidia.acceptLicense = true;
2023-12-12 00:48:10 +01:00
}