23 lines
695 B
Nix
23 lines
695 B
Nix
{ config, lib, ... }:
|
|
{
|
|
boot.kernelParams = [
|
|
"nouveau.config=NvGspRm=1" # Use high power mode for Nouveau
|
|
"nvidia_drm.fbdev=1" # Fix framebuffer
|
|
];
|
|
|
|
hardware.nvidia = {
|
|
modesetting.enable = true;
|
|
nvidiaSettings = false;
|
|
open = if lib.versionOlder config.hardware.nvidia.package.version "560" then false else true;
|
|
powerManagement.enable = config.hardware.nvidia.open;
|
|
};
|
|
|
|
nixpkgs = {
|
|
allowUnfreePackages = [ "nvidia-x11" ];
|
|
config.nvidia.acceptLicense = true;
|
|
};
|
|
|
|
specialisation = lib.mkIf (lib.elem "nvidia" config.services.xserver.videoDrivers) {
|
|
nouveau.configuration.config.services.xserver.videoDrivers = lib.mkForce [ "nouveau" ];
|
|
};
|
|
}
|