]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/T14sAMDGen1.nix
pumpkin: add host
[julm/julm-nix.git] / nixos / profiles / hardware / T14sAMDGen1.nix
1 { pkgs, lib, config, inputs, ... }:
2 with lib;
3 {
4 imports = [
5 ../acpid.nix
6 ../acpi_call.nix
7 ../tlp.nix
8 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
9 ];
10
11 nixpkgs.hostPlatform = {
12 system = "x86_64-linux";
13 config = "x86_64-unknown-linux-gnu";
14 };
15
16 boot.kernelModules = [
17 "kvm_amd"
18 ];
19 boot.extraModulePackages = [
20 ];
21 boot.kernelParams = [
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"
25 ];
26 boot.initrd.kernelModules = [
27 "aesni_intel" # even for AMD
28 "r8152" # USB Ethernet dongle
29 "crypto_simd"
30 "nvme" # NVME M.2 disk
31 "uas" # USB storage
32 "xhci_hcd"
33 ];
34 boot.initrd.availableKernelModules = [
35 ];
36
37 environment.systemPackages = [
38 pkgs.fwupd
39 ];
40 environment.variables = {
41 };
42
43 hardware.amdgpu.initrd.enable = lib.mkDefault true;
44 hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
45 hardware.graphics = {
46 enable = mkDefault true;
47 enable32Bit = mkDefault true;
48 extraPackages = [
49 ];
50 };
51 hardware.trackpoint.enable = mkDefault true;
52 hardware.trackpoint.emulateWheel = mkDefault config.hardware.trackpoint.enable;
53
54 services.fwupd.enable = true;
55 services.upower.enable = true;
56 services.libinput.enable = mkDefault true;
57
58 services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
59
60 }