]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/X200.nix
nix: hardware: remove thinkpad profile
[julm/julm-nix.git] / nixos / profiles / hardware / X200.nix
1 { pkgs, lib, config, ... }:
2 with lib;
3 {
4 imports = [
5 ../acpid.nix
6 ../tlp.nix
7 ];
8
9 nixpkgs.hostPlatform = {
10 system = "x86_64-linux";
11 config = "x86_64-unknown-linux-gnu";
12 };
13
14 hardware.cpu.intel.updateMicrocode = true;
15
16 boot.kernelModules = [ "kvm-intel" ];
17 # https://bugzilla.kernel.org/show_bug.cgi?id=110941
18 boot.kernelParams = [ "intel_pstate=no_hwp" ];
19 boot.initrd.availableKernelModules = [
20 "ahci"
21 "drbg"
22 "ehci_pci"
23 "gf128mul"
24 "hmac"
25 "sd_mod"
26 # tp_smapi works on ThinkPads made before 2013. See compat table:
27 # https://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status
28 "tp_smapi"
29 ];
30 boot.extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ];
31
32 hardware.opengl.extraPackages = [
33 pkgs.fwupdmgr
34 pkgs.geteltorito
35 pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
36 pkgs.libvdpau-va-gl
37 pkgs.vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
38 pkgs.vaapiVdpau
39 ];
40
41 services.thinkfan = {
42 enable = true;
43 smartSupport = true;
44 levels = [
45 [ 0 0 57 ]
46 [ 1 56 60 ]
47 [ 2 59 63 ]
48 [ 3 62 65 ]
49 [ 4 64 67 ]
50 [ 5 66 72 ]
51 [ 6 71 78 ]
52 [ 7 77 82 ]
53 [ 127 81 32767 ]
54 ];
55 };
56 services.upower.enable = true;
57
58 # No pstore backend available on this system.
59 systemd.services.mount-pstore.enable = false;
60 }