File tree 9 files changed +91
-11
lines changed
9 files changed +91
-11
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,8 @@ See code for all available configurations.
238
238
| [ Lenovo ThinkPad X280] ( lenovo/thinkpad/x280 ) | ` <nixos-hardware/lenovo/thinkpad/x280> ` |
239
239
| [ Lenovo ThinkPad X390] ( lenovo/thinkpad/x390 ) | ` <nixos-hardware/lenovo/thinkpad/x390> ` |
240
240
| [ Lenovo ThinkPad Z Series] ( lenovo/thinkpad/z ) | ` <nixos-hardware/lenovo/thinkpad/z> ` |
241
- | [ Lenovo ThinkPad Z13] ( lenovo/thinkpad/z/z13 ) | ` <nixos-hardware/lenovo/thinkpad/z/z13> ` |
241
+ | [ Lenovo ThinkPad Z13 Gen 1] ( lenovo/thinkpad/z/gen1/z13 ) | ` <nixos-hardware/lenovo/thinkpad/z/gen1/z13> ` |
242
+ | [ Lenovo ThinkPad Z13 Gen 2] ( lenovo/thinkpad/z/gen2/z13 ) | ` <nixos-hardware/lenovo/thinkpad/z/gen2/z13> ` |
242
243
| [ LENOVO Yoga 6 13ALC6 82ND] ( lenovo/yoga/6/13ALC6 ) | ` <nixos-hardware/lenovo/yoga/6/13ALC6> ` |
243
244
| [ LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND] ( lenovo/yoga/7/14ARH7/amdgpu ) | ` <nixos-hardware/lenovo/yoga/7/14ARH7/amdgpu> ` |
244
245
| [ LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND] ( lenovo/yoga/7/14ARH7/nvidia ) | ` <nixos-hardware/lenovo/yoga/7/14ARH7/nvidia> ` |
Original file line number Diff line number Diff line change 175
175
lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280 ;
176
176
lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390 ;
177
177
lenovo-thinkpad-z = import ./lenovo/thinkpad/z ;
178
- lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13 ;
178
+ lenovo-thinkpad-z13-gen1 = import ./lenovo/thinkpad/z/gen1/z13 ;
179
+ lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13 ;
179
180
lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6 ;
180
181
lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7 ;
181
182
lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8 ;
Original file line number Diff line number Diff line change 7
7
../../../common/pc/laptop
8
8
../../../common/pc/laptop/acpi_call.nix
9
9
../../../common/pc/laptop/ssd
10
- ../../../common/hidpi.nix # can be dropped after nixos 23.05
11
10
] ;
12
- # kernel versions prior to 5.18 won't boot
13
- boot . kernelPackages = lib . mkIf ( lib . versionOlder pkgs . linux . version "5.18" ) ( lib . mkDefault pkgs . linuxPackages_latest ) ;
14
11
15
12
hardware . enableRedistributableFirmware = lib . mkDefault true ;
16
13
hardware . trackpoint . device = lib . mkDefault "TPPS/2 Elan TrackPoint" ;
17
14
18
15
services . fprintd . enable = lib . mkDefault true ;
19
16
20
- # kernel versions below 6.0 don' t contain ACPI suspend2idle drivers for the Z13s AMD hardware
17
+ # kernel versions below 6.0 don’ t contain ACPI suspend2idle drivers for the Z-series’ AMD hardware
21
18
# my Z13 froze after waking up from suspend/ hibernate
22
19
services . logind . lidSwitch = lib . mkIf ( lib . versionOlder pkgs . linux . version "6.00" ) ( lib . mkDefault "lock" ) ;
23
20
}
Original file line number Diff line number Diff line change
1
+ { lib , pkgs , ... } : {
2
+ imports = [
3
+ ../../../../lenovo/thinkpad/z
4
+ ] ;
5
+
6
+ # Kernel 5.18 is required for the Ryzen 6000 series
7
+ boot . kernelPackages = lib . mkIf ( lib . versionOlder pkgs . linux . version "5.18" ) ( lib . mkDefault pkgs . linuxPackages_latest ) ;
8
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ imports = [
3
+ ../../../../../lenovo/thinkpad/z/gen1
4
+ ] ;
5
+ }
Original file line number Diff line number Diff line change
1
+ { lib , pkgs , ... } :
2
+
3
+ {
4
+ imports = [
5
+ ../../../../lenovo/thinkpad/z
6
+ ] ;
7
+
8
+ # Kernel 6.4 is required for the Ryzen 7040 series
9
+ boot . kernelPackages = lib . mkIf ( lib . versionOlder pkgs . linux . version "6.4" ) ( lib . mkDefault pkgs . linuxPackages_latest ) ;
10
+
11
+ systemd . services = {
12
+ # Modified from Arch Wiki
13
+ "touchpad-fix" = {
14
+ enable = lib . mkDefault true ;
15
+ description = "I2C HID devices can fail to initialize so try to reload" ;
16
+ unitConfig = {
17
+ Type = "oneshot" ;
18
+ } ;
19
+ serviceConfig = {
20
+ User = "root" ;
21
+ } ;
22
+ wantedBy = [ "multi-user.target" ] ;
23
+ after = [ "multi-user.target" ] ;
24
+ script = ''
25
+ count=0
26
+ while true; do
27
+ ${ lib . getExe pkgs . libinput } list-devices | ${ lib . getExe pkgs . gnugrep } --quiet SNSL && break
28
+ count=$((count + 1))
29
+
30
+ if test $count -ge 5; then
31
+ echo "Touchpad not read after $count attempts"
32
+ break
33
+ fi
34
+
35
+ echo "Touchpad not ready; attempt $count to reload"
36
+ ${ pkgs . kmod } /bin/rmmod i2c_hid_acpi
37
+ ${ pkgs . kmod } /bin/modprobe i2c_hid_acpi
38
+
39
+ sleep $((2 + (count * 3)))
40
+ done
41
+ '' ;
42
+ } ;
43
+ } ;
44
+ }
Original file line number Diff line number Diff line change
1
+ { pkgs , lib , ...} :
2
+
3
+ {
4
+ imports = [
5
+ ../../../../../lenovo/thinkpad/z/gen2
6
+ ] ;
7
+
8
+ sound . extraConfig = ''
9
+ pcm.!default {
10
+ type plug
11
+ slave.pcm "hw:1,0"
12
+ }
13
+
14
+ ctl.!default {
15
+ type hw
16
+ card 1
17
+ }
18
+ '' ;
19
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ assertions = [
3
+ {
4
+ assertion = true ;
5
+ message = ''
6
+ Lenovo Z-series received a second generation so the hardware configuration has been split by generation. For the Z13 Gen 1 config, change from `lenovo-thinkpad-z13` to `lenovo-thinkpad-z13-gen1`.
7
+ '' ;
8
+ }
9
+ ] ;
10
+ }
You can’t perform that action at this time.
0 commit comments