]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/thinkpad.nix
nixos-fallback: use a transient service
[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
33 services.thinkfan = {
34 enable = true;
35 smartSupport = true;
36 levels = [
37 [0 0 57]
38 [1 56 60]
39 [2 59 63]
40 [3 62 65]
41 [4 64 67]
42 [5 66 72]
43 [6 71 78]
44 [7 77 82]
45 [127 81 32767]
46 ];
47 };
48
49 # No pstore backend available on this system.
50 systemd.services.mount-pstore.enable = false;
51 }