]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/thinkpad.nix
git: more verbose lp
[julm/julm-nix.git] / nixos / profiles / hardware / thinkpad.nix
1 { config, lib, pkgs, ... }:
2 {
3 boot.cleanTmpDir = true;
4 boot.tmpOnTmpfs = true;
5
6 boot.kernelModules = [ "kvm-intel" ];
7 # https://bugzilla.kernel.org/show_bug.cgi?id=110941
8 boot.kernelParams = [ "intel_pstate=no_hwp" ];
9
10 boot.initrd.availableKernelModules = [
11 "ahci"
12 "drbg"
13 "ehci_pci"
14 "gf128mul"
15 "hmac"
16 "sd_mod"
17 ];
18
19 hardware.cpu.intel.updateMicrocode = true;
20 hardware.opengl.extraPackages = [
21 pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
22 pkgs.vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
23 pkgs.vaapiVdpau
24 pkgs.libvdpau-va-gl
25 ];
26
27 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
28
29 services.thinkfan = {
30 enable = true;
31 smartSupport = true;
32 levels = [
33 [0 0 57]
34 [1 56 60]
35 [2 59 63]
36 [3 62 65]
37 [4 64 67]
38 [5 66 72]
39 [6 71 78]
40 [7 77 82]
41 [127 81 32767]
42 ];
43 };
44
45 # No pstore backend available on this system.
46 systemd.services.mount-pstore.enable = false;
47 }