]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/T14sAMDGen1.nix
praat: install in science profile
[julm/julm-nix.git] / nixos / profiles / hardware / T14sAMDGen1.nix
1 {
2 pkgs,
3 lib,
4 config,
5 inputs,
6 ...
7 }:
8 with lib;
9 {
10 imports = [
11 ../acpid.nix
12 ../acpi_call.nix
13 ../auto-cpufreq.nix
14 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
15 ];
16
17 nixpkgs.hostPlatform = {
18 system = "x86_64-linux";
19 config = "x86_64-unknown-linux-gnu";
20 #gcc.arch = "znver3";
21 #gcc.tune = "znver3";
22 };
23
24 # For NVIDIA GPUs only (though it may change), and very heavy (>1GiB), and downloading fails often
25 nixpkgs.config.cudaSupport = false;
26 #nixpkgs.config.rocmSupport = false;
27 #nixpkgs.config.allowBroken = true;
28
29 boot.kernelModules = [
30 "kvm_amd"
31 ];
32 boot.extraModulePackages = [
33 ];
34 boot.kernelParams = [
35 # Embedded controller wake-ups drain battery in s2idle on this device
36 # See https://lore.kernel.org/all/ZnFYpWHJ5Ml724Nv@ohnotp/
37 #"acpi.ec_no_wakeup=1"
38 ];
39 boot.initrd.kernelModules = [
40 "aesni_intel" # even for AMD
41 "r8152" # USB Ethernet dongle
42 "crypto_simd"
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 }