Refactoring the config

This commit is contained in:
Lyes Saadi 2024-11-10 18:06:07 +01:00
parent 9c3fc1879c
commit 0e866b1cb0
No known key found for this signature in database
GPG key ID: 17418538BAA17767
24 changed files with 355 additions and 304 deletions

View file

@ -0,0 +1,39 @@
{ ... }:
{
# NVidia
services.xserver.videoDrivers = [ "nvidia" ];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
hardware.nvidia = {
# Modesetting is needed for most wayland compositors
modesetting.enable = true;
# Use the open source version of the kernel module
# Only available on driver 515.43.04+
open = true;
# Enable the nvidia settings menu
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU
# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
# For containers
hardware.nvidia-container-toolkit.enable = true;
}