nixcfg/hosts/mandarin/hardware.nix

50 lines
1.1 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")
];
boot = {
initrd = {
2024-06-14 19:29:56 -04:00
availableKernelModules = [
"nvme"
"sd_mod"
"usb_storage"
"usbhid"
"xhci_pci"
];
2024-06-14 14:05:59 -04:00
kernelModules = [];
};
kernelModules = ["kvm-amd"];
};
hardware = {
nvidia = {
# Modesetting is required.
modesetting.enable = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
opengl = {
driSupport = true;
driSupport32Bit = true;
};
};
services.xserver.videoDrivers = ["nvidia"];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}