parent
fb5d4d46f8
commit
6cb66d86d2
153 changed files with 2078 additions and 3094 deletions
44
modules/nixos/hardware/gpu/nvidia/default.nix
Normal file
44
modules/nixos/hardware/gpu/nvidia/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../graphics.nix
|
||||
];
|
||||
|
||||
hardware = {
|
||||
nvidia = {
|
||||
open = true;
|
||||
modesetting.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
nvidiaSettings = false;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
"nvidia_drm.fbdev=1"
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
environment.sessionVariables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
NVD_BACKEND = "direct";
|
||||
NIXOS_OZONE_WL = 1;
|
||||
};
|
||||
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue