18 lines
531 B
Nix
18 lines
531 B
Nix
{ config, lib, ... }:
|
|
{
|
|
config = lib.mkIf (lib.elem "nvidia" config.services.xserver.videoDrivers) {
|
|
boot.kernelParams = [ "nvidia_drm.fbdev=1" ]; # Framebuffer fixes TTY access
|
|
|
|
hardware.nvidia = {
|
|
modesetting.enable = true;
|
|
nvidiaSettings = false;
|
|
open = true;
|
|
};
|
|
|
|
nixpkgs.allowUnfreePackages = [ "nvidia-x11" ];
|
|
|
|
specialisation.nouveau.configuration.config.services.xserver.videoDrivers = lib.mkForce [ "nouveau" ];
|
|
} // {
|
|
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
|
|
};
|
|
}
|