nix-config/nixos/_mixins/hardware/gtx-1080ti.nix

50 lines
1.2 KiB
Nix
Raw Permalink Normal View History

{ pkgs, config, ... }:
let
vulkanDriverFiles = [
"${config.hardware.nvidia.package}/share/vulkan/icd.d/nvidia_icd.x86_64.json"
"${config.hardware.nvidia.package.lib32}/share/vulkan/icd.d/nvidia_icd.i686.json"
];
in
{
environment = {
2024-06-06 15:17:28 +00:00
systemPackages = with pkgs; [ vulkan-tools nvtopPackages.full ];
variables = {
VK_DRIVER_FILES = builtins.concatStringsSep ":" vulkanDriverFiles;
};
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = false;
# Only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
open = false;
nvidiaSettings = true;
};
opengl = {
enable = true;
inherit (config.hardware.nvidia) package;
driSupport = true;
driSupport32Bit = true;
};
pulseaudio.support32Bit = true;
};
2024-08-15 05:29:41 +00:00
hardware.nvidia-container-toolkit.enable = true;
}