]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/T14sAMDGen1.nix
+user/updatability(nixos-unstable): pin latest
[julm/julm-nix.git] / nixos / profiles / hardware / T14sAMDGen1.nix
1 {
2 pkgs,
3 lib,
4 config,
5 ...
6 }:
7 with lib;
8 {
9 imports = [
10 ../acpid.nix
11 ../acpi_call.nix
12 ../auto-cpufreq.nix
13 #inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
14 ];
15
16 nixpkgs.hostPlatform = {
17 system = "x86_64-linux";
18 config = "x86_64-unknown-linux-gnu";
19 #gcc.arch = "znver3";
20 #gcc.tune = "znver3";
21 };
22 # CorrectnessNote: when /sys/devices/system/cpu/smt/control = off
23 _module.args.CPUs = 8;
24
25 # For NVIDIA GPUs only (though it may change), and very heavy (>1GiB), and downloading fails often
26 nixpkgs.config.cudaSupport = false;
27 #nixpkgs.config.rocmSupport = false;
28 #nixpkgs.config.allowBroken = true;
29
30 boot.kernelModules = [
31 "kvm_amd"
32 ];
33 boot.extraModulePackages = [
34 ];
35 boot.kernelParams = [
36 # Embedded controller wake-ups drain battery in s2idle on this device
37 # See https://lore.kernel.org/all/ZnFYpWHJ5Ml724Nv@ohnotp/
38 #"acpi.ec_no_wakeup=1"
39 ];
40 boot.initrd.kernelModules = [
41 "aesni_intel" # even for AMD
42 "r8152" # USB Ethernet dongle
43 "nvme" # NVME M.2 disk
44 "uas" # USB storage
45 "xhci_hcd"
46 ];
47 boot.initrd.availableKernelModules = [
48 ];
49
50 environment.systemPackages = [
51 pkgs.fwupd
52 ];
53 environment.variables = {
54 };
55
56 hardware.amdgpu.initrd.enable = lib.mkDefault true;
57 hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
58 hardware.graphics = {
59 enable = mkDefault true;
60 enable32Bit = mkDefault true;
61 extraPackages = [
62 ];
63 };
64 hardware.trackpoint.enable = mkDefault true;
65 hardware.trackpoint.emulateWheel = mkDefault config.hardware.trackpoint.enable;
66
67 # WarningNote: be sure to "allow Windows UEFI updates"
68 # See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported
69 services.fwupd.enable = true;
70 services.upower.enable = true;
71 services.libinput.enable = mkDefault true;
72
73 services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
74
75 }