]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/X201.nix
blackberry: install libreoffice
[julm/julm-nix.git] / nixos / profiles / hardware / X201.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 boot.kernelModules = [ "kvm-intel" ];
15 # https://bugzilla.kernel.org/show_bug.cgi?id=110941
16 boot.initrd.availableKernelModules = [
17 "ahci"
18 "drbg"
19 "ehci_pci"
20 "gf128mul"
21 "hmac"
22 "sd_mod"
23 # tp_smapi works on ThinkPads made before 2013. See compat table:
24 # https://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status
25 "tp_smapi"
26 ];
27 boot.extraModulePackages = with config.boot.kernelPackages; [
28 tp_smapi
29 ];
30 boot.kernelParams = [ "intel_pstate=no_hwp" ];
31
32 environment.systemPackages = [
33 pkgs.geteltorito
34 ];
35
36 hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
37 hardware.opengl.extraPackages = [
38 pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
39 # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
40 (if (versionOlder (versions.majorMinor version) "23.11") then pkgs.vaapiIntel else pkgs.intel-vaapi-driver)
41 pkgs.libvdpau-va-gl
42 pkgs.vaapiVdpau
43 ];
44 hardware.trackpoint.enable = mkDefault true;
45 hardware.trackpoint.emulateWheel = mkDefault config.hardware.trackpoint.enable;
46
47 services.thinkfan = {
48 enable = true;
49 smartSupport = true;
50 levels = [
51 [ 0 0 57 ]
52 [ 1 56 60 ]
53 [ 2 59 63 ]
54 [ 3 62 65 ]
55 [ 4 64 67 ]
56 [ 5 66 72 ]
57 [ 6 71 78 ]
58 [ 7 77 82 ]
59 [ 127 81 32767 ]
60 ];
61 };
62 services.upower.enable = true;
63 services.libinput.enable = mkDefault true;
64
65 # No pstore backend available on this system.
66 systemd.services.mount-pstore.enable = false;
67 }