forked from NixOS/nixos-hardware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
32 lines (29 loc) · 856 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ lib, pkgs, ... }: {
imports = [
../../../../common/gpu/nvidia/prime.nix
../../../../common/gpu/nvidia/ampere
];
#D-Bus service to check the availability of dual-GPU
services.switcherooControl.enable = lib.mkDefault true;
hardware = {
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
};
nvidia = {
prime = {
# Bus ID of the Intel GPU.
intelBusId = lib.mkDefault "PCI:0:2:0";
# Bus ID of the NVIDIA GPU.
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
};
powerManagement = {
# Enable NVIDIA power management.
enable = lib.mkDefault true;
# Enable dynamic power management.
finegrained = lib.mkDefault true;
};
};
};
}