initial commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{...}: {
|
||||
# Dedicated NVIDIA GPU (single discrete card, no hybrid/PRIME).
|
||||
# For Intel+NVIDIA laptops (e.g. the T480), use gpuNvidiaPrime instead.
|
||||
flake.nixosModules.gpuNvidia = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
# Proprietary kernel modules. Set to true only for Turing+ (RTX 20xx and
|
||||
# newer) where the open modules are well supported.
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
# Fixes suspend/resume corruption on many setups.
|
||||
powerManagement.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vulkan-tools
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user