]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/T480.nix
git: rename pu to pl
[julm/julm-nix.git] / nixos / profiles / hardware / T480.nix
1 { pkgs, lib, config, ... }:
2 with lib;
3 {
4 imports = [
5 ../acpid.nix
6 ../acpi_call.nix
7 ../tlp.nix
8 ];
9
10 nixpkgs.hostPlatform = {
11 system = "x86_64-linux";
12 config = "x86_64-unknown-linux-gnu";
13 };
14
15 boot.kernelModules = [
16 "kvm_intel"
17 ];
18 boot.extraModulePackages = [
19 ];
20 boot.kernelParams = [
21 ];
22 boot.initrd.kernelModules = [
23 "aesni_intel"
24 "crypto_simd"
25 "e1000e" # Ethernet
26 "i915"
27 "nvme" # NVME M.2 disk
28 "uas" # USB storage
29 "xhci_hcd"
30 ];
31 boot.initrd.availableKernelModules = [
32 ];
33
34 environment.systemPackages = [
35 pkgs.fwupd
36 ];
37 environment.variables = {
38 VDPAU_DRIVER = mkIf config.hardware.opengl.enable (mkDefault "va_gl");
39 };
40
41 hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
42 hardware.opengl.extraPackages = [
43 pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
44 # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
45 (if (versionOlder (versions.majorMinor version) "23.11") then pkgs.vaapiIntel else pkgs.intel-vaapi-driver)
46 pkgs.libvdpau-va-gl
47 pkgs.vaapiVdpau
48 ];
49 hardware.trackpoint.enable = mkDefault true;
50 hardware.trackpoint.emulateWheel = mkDefault config.hardware.trackpoint.enable;
51
52 services.fwupd.enable = true;
53 services.upower.enable = true;
54 services.xserver.libinput.enable = mkDefault true;
55 }