-
-
Notifications
You must be signed in to change notification settings - Fork 679
/
Copy pathdefault.nix
58 lines (43 loc) · 1.07 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib,
pkgs,
config,
...
}:
let
inherit (lib) mkDefault;
in {
imports = [
../shared.nix
## "prime.nix" loads this, aleady:
# ../../../common/gpu/nvidia
../../../../common/gpu/nvidia/prime.nix
../../../../common/gpu/nvidia/ada-lovelace
];
# NVIDIA GeForce RTX 4070 Mobile
boot = {
blacklistedKernelModules = [ "nouveau" ];
};
hardware = {
## Enable the Nvidia card, as well as Prime and Offload:
amdgpu.initrd.enable = mkDefault true;
nvidia = {
#to avoid problems with gnome 47 vulkan
package = mkDefault config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true;
nvidiaSettings = mkDefault true;
prime = {
offload = {
enable = mkDefault true;
enableOffloadCmd = mkDefault true;
};
amdgpuBusId = "PCI:69:0:0";
nvidiaBusId = "PCI:1:0:0";
};
powerManagement = {
enable = mkDefault true;
finegrained = mkDefault true;
};
dynamicBoost.enable = mkDefault true;
};
};
}