1 { pkgs, lib, config, inputs, ... }:
8 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
11 nixpkgs.hostPlatform = {
12 system = "x86_64-linux";
13 config = "x86_64-unknown-linux-gnu";
16 boot.kernelModules = [
19 boot.extraModulePackages = [
22 # Embedded controller wake-ups drain battery in s2idle on this device
23 # See https://lore.kernel.org/all/ZnFYpWHJ5Ml724Nv@ohnotp/
24 #"acpi.ec_no_wakeup=1"
26 boot.initrd.kernelModules = [
27 "aesni_intel" # even for AMD
28 "r8152" # USB Ethernet dongle
30 "nvme" # NVME M.2 disk
34 boot.initrd.availableKernelModules = [
37 environment.systemPackages = [
40 environment.variables = {
43 hardware.amdgpu.initrd.enable = lib.mkDefault true;
44 hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
46 enable = mkDefault true;
47 enable32Bit = mkDefault true;
51 hardware.trackpoint.enable = mkDefault true;
52 hardware.trackpoint.emulateWheel = mkDefault config.hardware.trackpoint.enable;
54 services.fwupd.enable = true;
55 services.upower.enable = true;
56 services.libinput.enable = mkDefault true;
58 services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];