]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/T14sAMDGen1.nix
nan2gua1: postgresql: enable
[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 # CorrectnessNote: when /sys/devices/system/cpu/smt/control = off
24 _module.args.CPUs = 8;
25
26 # For NVIDIA GPUs only (though it may change), and very heavy (>1GiB), and downloading fails often
27 nixpkgs.config.cudaSupport = false;
28 #nixpkgs.config.rocmSupport = false;
29 #nixpkgs.config.allowBroken = true;
30
31 boot.kernelModules = [
32 "kvm_amd"
33 ];
34 boot.extraModulePackages = [
35 ];
36 boot.kernelParams = [
37 # Embedded controller wake-ups drain battery in s2idle on this device
38 # See https://lore.kernel.org/all/ZnFYpWHJ5Ml724Nv@ohnotp/
39 #"acpi.ec_no_wakeup=1"
40 ];
41 boot.initrd.kernelModules = [
42 "aesni_intel" # even for AMD
43 "r8152" # USB Ethernet dongle
44 "crypto_simd"
45 "nvme" # NVME M.2 disk
46 "uas" # USB storage
47 "xhci_hcd"
48 ];
49 boot.initrd.availableKernelModules = [
50 ];
51
52 environment.systemPackages = [
53 pkgs.fwupd
54 ];
55 environment.variables = {
56 };
57
58 hardware.amdgpu.initrd.enable = lib.mkDefault true;
59 hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
60 hardware.graphics = {
61 enable = mkDefault true;
62 enable32Bit = mkDefault true;
63 extraPackages = [
64 ];
65 };
66 hardware.trackpoint.enable = mkDefault true;
67 hardware.trackpoint.emulateWheel = mkDefault config.hardware.trackpoint.enable;
68
69 # WarningNote: be sure to "allow Windows UEFI updates"
70 # See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported
71 services.fwupd.enable = true;
72 services.upower.enable = true;
73 services.libinput.enable = mkDefault true;
74
75 services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
76
77 }