54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{ pkgs
|
|
, config
|
|
, ...
|
|
}:
|
|
{
|
|
boot = {
|
|
kernelModules = [ "nvidia" ];
|
|
kernelParams = [ "nvidia-drm.modset=1" ];
|
|
blacklistedKernelModules = [ "nouveau" ];
|
|
};
|
|
hardware = {
|
|
graphics = {
|
|
enable = true;
|
|
enable32Bit = true;
|
|
};
|
|
nvidia-container-toolkit = {
|
|
enable = true;
|
|
suppressNvidiaDriverAssertion = true;
|
|
};
|
|
nvidia = {
|
|
modesetting.enable = true;
|
|
nvidiaSettings = true;
|
|
open = false;
|
|
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
|
powerManagement.enable = true;
|
|
powerManagement.finegrained = false;
|
|
};
|
|
};
|
|
|
|
services = {
|
|
desktopManager.gnome.enable = true;
|
|
displayManager = {
|
|
gdm.enable = true;
|
|
gdm.wayland = true;
|
|
defaultSession = "gnome";
|
|
};
|
|
|
|
xserver = {
|
|
enable = true;
|
|
videoDrivers = [ "nvidia" ];
|
|
};
|
|
};
|
|
|
|
nixpkgs.config.cudaSupport = true;
|
|
environment.systemPackages = with pkgs; [
|
|
cudaPackages.cuda_nvcc
|
|
cudaPackages.cudatoolkit
|
|
libepoxy
|
|
mesa-demos
|
|
libglvnd
|
|
nvidia-container-toolkit
|
|
vulkan-tools
|
|
];
|
|
}
|