added module for nvidia
This commit is contained in:
20
modules/nvidia.nix
Normal file
20
modules/nvidia.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# enable nvidia proprietary driver
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true; # required
|
||||
open = false; # use proprietary driver
|
||||
nvidiaSettings = true; # no shit
|
||||
powerManagement.enable = false; # can cause sleep issues
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# install nvidia-smi
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-smi
|
||||
];
|
||||
|
||||
# enable docker gpu passthrough
|
||||
virtualisation.docker.enableNvidia = true;
|
||||
}
|
||||
Reference in New Issue
Block a user