blob: 1c634a7f457bd40a35cd9a2a63287aa2ece78c1d (
plain) (
blame)
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
|
{
config,
lib,
inputs,
pkgs,
modulesPath,
...
}: let
powerMode = "performance";
in {
imports = [
./disks.nix
"${modulesPath}/profiles/all-hardware.nix"
];
boot = {
initrd = {
availableKernelModules = ["xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" "aesni_intel" "cryptd"];
kernelModules = [];
};
kernelPackages = pkgs.linuxPackages_latest;
kernelModules = ["kvm_intel" "nvidia"];
extraModulePackages = [config.boot.kernelPackages.nvidia_x11];
kernelParams = ["boot.shell_on_fail" "net.ifnames=0" "biosdevname=0" "iomem=relaxed" "mitigations=off"];
};
powerManagement.cpuFreqGovernor = powerMode;
services = {
xserver = {
videoDrivers = ["nvidia"];
};
fstrim.enable = true;
};
hardware = {
cpu.intel.updateMicrocode = true;
graphics = {
enable = true;
};
nvidia = {
modesetting.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
nvidia-container-toolkit.enable = true;
};
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
environment.systemPackages = with pkgs; [
clinfo
];
}
|