2023-05-27 18:21:12 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.hardware.az_nvidia;
|
|
|
|
in
|
2021-12-03 18:35:37 +01:00
|
|
|
{
|
2023-05-27 18:21:12 +02:00
|
|
|
options = {
|
|
|
|
hardware.az_nvidia.enable = lib.mkEnableOption "Nvidia GPU Support";
|
2021-12-03 18:35:37 +01:00
|
|
|
};
|
|
|
|
|
2023-05-27 18:21:12 +02:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment = {
|
|
|
|
variables = {
|
|
|
|
XDG_DATA_HOME = "$HOME/.local/share";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware.nvidia.prime = {
|
|
|
|
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
|
|
|
intelBusId = "PCI:00:02:0";
|
2021-12-03 18:35:37 +01:00
|
|
|
|
2023-05-27 18:21:12 +02:00
|
|
|
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
|
|
|
nvidiaBusId = "PCI:01:00:0";
|
|
|
|
};
|
2021-12-03 18:35:37 +01:00
|
|
|
};
|
|
|
|
}
|