dotfiles/nixos/nvidia.nix
2024-10-02 18:54:27 -06:00

19 lines
549 B
Nix

{ config, pkgs, makeEnable, ... }:
makeEnable config "myModules.nvidia" false {
environment.systemPackages = with pkgs; [
nvidia-container-toolkit
];
hardware.nvidia-container-toolkit = {
enable = true;
mount-nvidia-executables = true;
};
hardware.nvidia.open = false;
hardware.graphics.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
hardware.graphics.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
hardware.graphics.enable32Bit = true;
services.xserver = {
videoDrivers = [ "nvidia" ];
};
}