Refactoring the config
This commit is contained in:
parent
9c3fc1879c
commit
0e866b1cb0
24 changed files with 355 additions and 304 deletions
39
modules/nvidia/default.nix
Normal file
39
modules/nvidia/default.nix
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue