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