]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/courge/hardware/nvidia.nix
julm: carotte: no need for vim
[julm/julm-nix.git] / hosts / courge / hardware / nvidia.nix
1 { pkgs, lib, config, hostName, ... }:
2 with lib;
3 {
4 environment.systemPackages = [
5 #pkgs.cudatoolkit
6 ];
7
8 hardware.nvidia.prime = {
9 sync.enable = true;
10 #offload.enable = true;
11 intelBusId = "PCI:0:2:0";
12 nvidiaBusId = "PCI:1:0:0";
13 };
14
15 # Load nvidia driver for Xorg and Wayland
16 #services.xserver.videoDrivers = [ "nvidia" ];
17 boot.blacklistedKernelModules = [ "nouveau" ];
18
19 hardware.nvidia = {
20 # Modesetting is required.
21 modesetting.enable = true;
22
23 # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
24 powerManagement.enable = false;
25 # Fine-grained power management. Turns off GPU when not in use.
26 # Experimental and only works on modern Nvidia GPUs (Turing or newer).
27 powerManagement.finegrained = false;
28
29 # Use the NVidia open source kernel module (not to be confused with the
30 # independent third-party "nouveau" open source driver).
31 # Support is limited to the Turing and later architectures. Full list of
32 # supported GPUs is at:
33 # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
34 # Only available from driver 515.43.04+
35 # Currently alpha-quality/buggy, so false is currently the recommended setting.
36 open = false;
37
38 # Enable the Nvidia settings menu,
39 # accessible via `nvidia-settings`.
40 nvidiaSettings = true;
41
42 # Optionally, you may need to select the appropriate driver version for your specific GPU.
43 package = config.boot.kernelPackages.nvidiaPackages.stable;
44 };
45 }