mandarin: switched to amd gpu

This commit is contained in:
Aly Raffauf 2024-06-15 17:47:22 -04:00
parent db6d934824
commit 32a9eef8d3
3 changed files with 15 additions and 16 deletions

View file

@ -27,7 +27,7 @@
base = {
enable = true;
plymouth.enable = true;
zramSwap = {enable = true;};
zramSwap.enable = true;
};
users = {
aly = {
@ -63,7 +63,7 @@
flatpak.enable = true;
ollama = {
enable = true;
gpu = "nvidia";
gpu = "rocm";
};
tailscale.enable = true;
};

View file

@ -11,6 +11,8 @@
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
inputs.nixos-hardware.nixosModules.common-cpu-amd
inputs.nixos-hardware.nixosModules.common-pc-ssd
];
boot = {
@ -22,9 +24,9 @@
"usbhid"
"xhci_pci"
];
kernelModules = [];
kernelModules = ["amdgpu"];
};
kernelModules = ["kvm-amd"];
kernelModules = ["kvm-amd" "amdgpu"];
};
hardware = {
@ -33,19 +35,16 @@
enableAllFirmware = true;
nvidia = {
modesetting.enable = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
opengl = {
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk];
extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
};
};
services.xserver.videoDrivers = ["nvidia"];
services.xserver.videoDrivers = ["amdgpu"];
networking.useDHCP = lib.mkDefault true;

View file

@ -15,16 +15,12 @@
boot = {
initrd = {
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
kernelModules = [];
kernelModules = ["amdgpu"];
};
kernelModules = ["kvm-amd" "amdgpu"];
};
services.xserver = {
videoDrivers = ["amdgpu"]; # Add AMDGPU driver.
};
hardware = {
cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
@ -70,6 +66,10 @@
}
];
services.xserver = {
videoDrivers = ["amdgpu"]; # Add AMDGPU driver.
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";