]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/X200.nix
julm: blackberry: yt-dlp: format-sort: +res~720p
[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 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 nix.settings.auto-optimise-store = false;
48
49 services.thinkfan = {
50 enable = true;
51 smartSupport = true;
52 levels = [
53 [ 0 0 57 ]
54 [ 1 56 60 ]
55 [ 2 59 63 ]
56 [ 3 62 65 ]
57 [ 4 64 67 ]
58 [ 5 66 72 ]
59 [ 6 71 78 ]
60 [ 7 77 82 ]
61 [ 127 81 32767 ]
62 ];
63 };
64 services.upower.enable = true;
65 services.libinput.enable = mkDefault true;
66
67 # No pstore backend available on this system.
68 systemd.services.mount-pstore.enable = false;
69 }