nixcfg/hosts/petalburg/hardware.nix

59 lines
1.3 KiB
Nix
Raw Normal View History

2024-03-01 19:50:36 -05:00
{
2024-04-07 22:16:33 -04:00
config,
inputs,
2024-04-07 22:16:33 -04:00
lib,
pkgs,
2024-04-07 22:16:33 -04:00
...
}: {
boot = {
initrd = {
availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
kernelModules = ["i915"];
};
kernelModules = ["kvm-intel"];
kernelPackages = pkgs.linuxPackages_latest;
};
2024-04-05 23:12:46 -04:00
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
VDPAU_DRIVER = "va_gl";
2024-04-05 23:12:46 -04:00
};
hardware = {
cpu.intel.updateMicrocode = true;
enableAllFirmware = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
extraPackages32 = with pkgs.driversi686Linux; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
sensor.iio.enable = true; # Enable auto-rotate and tablet mode.
2024-04-05 23:12:46 -04:00
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
2024-04-05 23:12:46 -04:00
# Save power/better manage heat & fans.
powerManagement.powertop.enable = true;
services = {
fstrim.enable = true;
thermald.enable = true;
};
2024-03-01 19:50:36 -05:00
}