2024-04-18 14:21:33 -04:00
|
|
|
{
|
|
|
|
config,
|
2024-06-14 21:18:00 -04:00
|
|
|
inputs,
|
2024-04-18 14:21:33 -04:00
|
|
|
lib,
|
|
|
|
modulesPath,
|
2024-06-14 21:18:00 -04:00
|
|
|
pkgs,
|
2024-04-18 14:21:33 -04:00
|
|
|
...
|
|
|
|
}: {
|
2024-05-24 09:37:37 -04:00
|
|
|
imports = [
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
inputs.nixos-hardware.nixosModules.framework-11th-gen-intel
|
|
|
|
];
|
2024-04-18 14:21:33 -04:00
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
boot = {
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
|
|
|
kernelModules = [];
|
|
|
|
};
|
|
|
|
|
|
|
|
extraModulePackages = [];
|
|
|
|
kernelModules = ["kvm-intel"];
|
|
|
|
};
|
2024-04-18 14:21:33 -04:00
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
nixpkgs = {
|
|
|
|
hostPlatform = lib.mkDefault "x86_64-linux";
|
2024-04-18 14:21:33 -04:00
|
|
|
};
|
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
hardware = {
|
|
|
|
cpu.intel.updateMicrocode =
|
|
|
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
|
|
|
enableAllFirmware = true;
|
|
|
|
|
|
|
|
opengl = {
|
|
|
|
enable = 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
|
|
|
|
];
|
|
|
|
};
|
2024-04-18 14:21:33 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
environment.sessionVariables = {
|
2024-06-14 21:18:00 -04:00
|
|
|
LIBVA_DRIVER_NAME = "iHD"; # Force intel-media-driver
|
|
|
|
};
|
2024-04-18 14:21:33 -04:00
|
|
|
|
|
|
|
# Save power/better manage heat & fans.
|
|
|
|
powerManagement.powertop.enable = true;
|
2024-06-03 14:15:19 -04:00
|
|
|
services.thermald.enable = true;
|
2024-04-18 14:21:33 -04:00
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
}
|