summary refs log tree commit diff stats
path: root/system/settings/machines/t470s.nix
blob: c1a829124f20f10eda90eb777a226c402d96adf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
  config,
  pkgs,
  ...
}: {
  hardware.usbWwan.enable = false; # unused
  systemd.services.ModemManager.enable = false;

  hardware.enableRedistributableFirmware = true;

  boot.extraModprobeConfig = ''
    options thinkpad_acpi fan_control=1
  '';

  services.thinkfan.sensors = ''
    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_input
    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input
    hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input
  '';
  services.thinkfan.levels = ''
    (0,     0,      48)
    (1,     45,     52)
    (2,     50,     57)
    (3,     55,     63)
    (6,     60,     65)
    (7,     60,     85)
    (127,   80,     32767)
  '';

  boot.postBootCommands = ''
    echo bfq > /sys/block/nvme0n1/queue/scheduler
  '';

  hardware.pulseaudio.extraConfig = ''
    load-module module-alsa-sink device=hw:0,7
  '';

  services.tlp.extraConfig = ''
    DISK_DEVICES="nvme0n1"
    DISK_IOSCHED="keep"
  '';

  services.xserver = {
    dpi = 109;
    monitorSection = ''
      DisplaySize 310 176
    '';
  };

  environment.systemPackages = with pkgs; [
    nvme-cli
  ];

  imports = [
    ../hardware/intel-gpu.nix
    ../hardware/thinkpad.nix
  ];
}