2023-08-18 12:33:16 +02:00
|
|
|
# Including this file will enable the NVidia driver, and PRIME offload
|
|
|
|
|
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkDefault;
|
|
|
|
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
../shared.nix
|
|
|
|
## "prime.nix" loads this, aleady:
|
|
|
|
# ../../../../common/gpu/nvidia
|
|
|
|
../../../../../common/gpu/nvidia/prime.nix
|
2024-09-04 19:22:06 +02:00
|
|
|
../../../../../common/gpu/nvidia/ampere
|
2023-08-18 12:33:16 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
# NVIDIA GeForce RTX 3050 Mobile (Ampere)
|
|
|
|
services.xserver.videoDrivers = mkDefault [ "nvidia" ];
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
## Enable the Nvidia card, as well as Prime and Offload:
|
2024-06-27 00:51:35 +02:00
|
|
|
amdgpu.initrd.enable = true;
|
2023-08-18 12:33:16 +02:00
|
|
|
|
|
|
|
nvidia = {
|
|
|
|
modesetting.enable = true;
|
|
|
|
nvidiaSettings = true;
|
|
|
|
|
|
|
|
prime = {
|
|
|
|
offload = {
|
|
|
|
enable = true;
|
|
|
|
enableOffloadCmd = true;
|
|
|
|
};
|
|
|
|
amdgpuBusId = "PCI:4:0:0";
|
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
|
|
};
|
|
|
|
|
|
|
|
powerManagement = {
|
|
|
|
enable = true;
|
|
|
|
# Doesn't seem to be reliable, yet?
|
|
|
|
# finegrained = true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|