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