I recently bought a Thinkpad X1 Carbon Gen 6. I would like to use the special keys (Function keys) to adjust the Screen brightness and Keyboard backlight. I am able to do that via command line by following the instructions in the links.
However my nixos configuration seems unable to find those, even though I have these enabled:
programs.light.enable = true;
programs.kbdlight.enable = true;
hardware.acpilight.enable = true;
I found in the referenced links two approaches to make that work: one is to symlink the vendor devices to more general paths; the other is to add Xorg devices and control them from the graphical interface. However I fail to find in the Nixos manual how could I achieve that.
Thoughts?
Also, suggestions on enabling other Thinkpad stuff would be greatly appreciated. I also have
imports =
[
<nixos-hardware/lenovo/thinkpad/x1/6th-gen>
# Include the results of the hardware scan.
/etc/nixos/hardware-configuration.nix
];
services.thinkfan = {
# postconditions:
# 1) status should be enabled:
# cat /proc/acpi/ibm/fan
# 2) No errors in systemd logs:
# journalctl -u thinkfan.service -f
enable = true;
sensors = ''
# Entries here discovered by:
# find /sys/devices -type f -name "temp*_input"
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon3/temp4_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon3/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon3/temp5_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon3/temp2_input
hwmon /sys/devices/virtual/thermal/thermal_zone2/hwmon1/temp1_input
hwmon /sys/devices/virtual/thermal/thermal_zone6/hwmon4/temp1_input
hwmon /sys/devices/virtual/thermal/thermal_zone4/hwmon2/temp1_input
'';
levels = ''
(0, 0, 42)
(1, 40, 47)
(2, 45, 52)
(3, 50, 57)
(4, 55, 62)
(5, 60, 77)
(7, 73, 93)
(127, 85, 32767)
'';
smartSupport = true;
};
]
although the smartSupport
is just a guess.