{ pkgs, lib, config, ... }: with lib; { imports = [ ../acpid.nix ../tlp.nix ]; nixpkgs.hostPlatform = { system = "x86_64-linux"; config = "x86_64-unknown-linux-gnu"; }; hardware.cpu.intel.updateMicrocode = true; boot.kernelModules = [ "kvm-intel" ]; # https://bugzilla.kernel.org/show_bug.cgi?id=110941 boot.kernelParams = [ "intel_pstate=no_hwp" ]; boot.initrd.availableKernelModules = [ "ahci" "drbg" "ehci_pci" "gf128mul" "hmac" "sd_mod" # tp_smapi works on ThinkPads made before 2013. See compat table: # https://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status "tp_smapi" ]; boot.extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ]; hardware.opengl.extraPackages = [ pkgs.fwupdmgr pkgs.geteltorito pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD pkgs.libvdpau-va-gl pkgs.vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) pkgs.vaapiVdpau ]; services.thinkfan = { enable = true; smartSupport = true; levels = [ [ 0 0 57 ] [ 1 56 60 ] [ 2 59 63 ] [ 3 62 65 ] [ 4 64 67 ] [ 5 66 72 ] [ 6 71 78 ] [ 7 77 82 ] [ 127 81 32767 ] ]; }; services.upower.enable = true; # No pstore backend available on this system. systemd.services.mount-pstore.enable = false; }