nixcfg/hosts/mandarin/hardware.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2024-06-14 14:05:59 -04:00
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
inputs,
lib,
modulesPath,
pkgs,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
2024-06-15 17:47:22 -04:00
inputs.nixos-hardware.nixosModules.common-cpu-amd
inputs.nixos-hardware.nixosModules.common-pc-ssd
2024-06-14 14:05:59 -04:00
];
boot = {
initrd = {
2024-06-14 19:29:56 -04:00
availableKernelModules = [
"nvme"
"sd_mod"
"usb_storage"
"usbhid"
"xhci_pci"
];
2024-06-15 17:47:22 -04:00
kernelModules = ["amdgpu"];
2024-06-14 14:05:59 -04:00
};
2024-06-15 17:47:22 -04:00
kernelModules = ["kvm-amd" "amdgpu"];
2024-06-14 14:05:59 -04:00
};
hardware = {
2024-06-14 20:39:32 -04:00
cpu.amd.updateMicrocode =
2024-06-14 20:44:50 -04:00
lib.mkDefault config.hardware.enableRedistributableFirmware;
enableAllFirmware = true;
2024-06-14 14:05:59 -04:00
opengl = {
driSupport = true;
driSupport32Bit = true;
2024-06-15 17:47:22 -04:00
extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk];
extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
2024-06-14 14:05:59 -04:00
};
};
2024-06-15 17:47:22 -04:00
services.xserver.videoDrivers = ["amdgpu"];
2024-06-14 14:05:59 -04:00
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}