Compare commits

...

23 commits

Author SHA1 Message Date
Aires 98564f268e Update readme for 16arha7
Some checks are pending
Test / tests (push) Waiting to run
2024-05-23 23:46:30 -04:00
Aires 85cc877626 Add kernel version check for Lenovo 16ARHA7 speaker fix 2024-05-23 20:49:09 -04:00
dependabot[bot] d9e0b26202 build(deps): bump cachix/install-nix-action from 26 to 27
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 26 to 27.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v26...V27)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 02:47:54 +00:00
Quinn X. J. f0cf568780 common/gpu/intel: add extraPackages32 2024-05-19 18:00:23 +00:00
Tad Fisher e85c7a78d2 lenovo/thinkpad/t14/amd/gen3: enable amd_pstate 2024-05-19 17:50:52 +00:00
Tad Fisher 81f1457023 lenovo/thinkpad/t14/amd/gen2: enable amd_pstate 2024-05-19 17:50:52 +00:00
Tad Fisher 55f8e366f0 lenovo/thinkpad/p14s/amd/gen2: enable amd_pstate 2024-05-19 17:50:52 +00:00
Tad Fisher 2659a52d7a lenovo/thinkpad/t14/amd/gen4: init 2024-05-19 17:50:52 +00:00
Tad Fisher 0d3eafc014 lenovo/thinkpad/p14s/amd/gen4: init 2024-05-19 17:50:52 +00:00
Tad Fisher 79cb5c5df6 lenovo/thinkpad/p14s/amd/gen3: init 2024-05-19 17:50:52 +00:00
Tad Fisher d526edb79b lenovo/thinkpad/p14s/amd/gen1: init 2024-05-19 17:50:52 +00:00
Tad Fisher 050f52eb55 lenovo/thinkpad/p14s: align with Thinkpad T14 configs 2024-05-19 17:50:52 +00:00
Matz Momme Klint 2a964239f6 omen/14-fb0798ng: init 2024-05-19 17:41:22 +00:00
fidgetingbits 0a944f8c68 dell/precision/7520: init 2024-05-19 17:31:50 +00:00
Robin Wils 6e7667c75d
Add hardware config for lenovo t5 26amr5 (#938)
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-05-19 19:19:36 +02:00
Jörg Thalheim 1a1fa391d5
Merge pull request #939 from Artoria2e5/patch-1
cpu/amd/zenpower: new
2024-05-19 19:15:57 +02:00
Cassie Cheung b55712de78 apple/t2: update to kernel 6.9 2024-05-18 12:08:09 +00:00
Timo ff1be1e3cd Add missing default xps-15-9570 module to flake.nix 2024-05-16 17:51:52 +00:00
Emre Cebi d68be3e5e2 Fixed error 2024-05-16 17:42:37 +00:00
Emre Cebi 9f7302060c Made modifications related to AMD CPU and nvidia GPU changes 2024-05-16 17:42:37 +00:00
Ganga Ram 772de835d5 Remove buildUBoot function from U-Boot build
The buildUBoot function is intended for internal use and is dedicated
for Raspberry Pi platforms. With latest nixpkgs it is causing
build failure in older uboot(prior to v2023.07) due to a Raspberry Pi patch.

Now this function is not used for the U-Boot build.

More Information:
https://github.com/NixOS/nixpkgs/pull/311614
https://github.com/NixOS/nixpkgs/pull/146634

Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
2024-05-16 16:04:12 +00:00
Mingye Wang 557645a9da
fixup! zenpower flake 2024-05-11 14:30:59 +08:00
Mingye Wang 9fe6b53cf0
cpu/amd/zenpower: new
The zenpower module provides much more detailed data than k10temp on Zen CPUs. Use it.
2024-05-11 14:29:46 +08:00
26 changed files with 458 additions and 70 deletions

View file

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/install-nix-action@V27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Show nixpkgs version

View file

@ -113,6 +113,7 @@ See code for all available configurations.
| [Dell Poweredge R7515](dell/poweredge/r7515) | `<nixos-hardware/dell/poweredge/r7515>` |
| [Dell Precision 3541](dell/precision/3541) | `<nixos-hardware/dell/precision/3541>` |
| [Dell Precision 5530](dell/precision/5530) | `<nixos-hardware/dell/precision/5530>` |
| [Dell Precision 7520](dell/precision/7520) | `<nixos-hardware/dell/precision/7520>` |
| [Dell XPS 13 7390](dell/xps/13-7390) | `<nixos-hardware/dell/xps/13-7390>` |
| [Dell XPS 13 9300](dell/xps/13-9300) | `<nixos-hardware/dell/xps/13-9300>` |
| [Dell XPS 13 9310](dell/xps/13-9310) | `<nixos-hardware/dell/xps/13-9310>` |
@ -178,6 +179,7 @@ See code for all available configurations.
| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `<nixos-hardware/lenovo/legion/16achg6/nvidia>` |
| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `<nixos-hardware/lenovo/legion/16irx8h>` |
| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `<nixos-hardware/lenovo/legion/16arha7>` |
| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `<nixos-hardware/lenovo/legion/t526amr5>` |
| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `<nixos-hardware/lenovo/legion/15ich>` |
| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `<nixos-hardware/lenovo/thinkpad/a475>` |
| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `<nixos-hardware/lenovo/thinkpad/e14/amd>` |
@ -190,7 +192,10 @@ See code for all available configurations.
| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `<nixos-hardware/lenovo/thinkpad/l14/intel>` |
| [Lenovo ThinkPad L480](lenovo/thinkpad/l480) | `<nixos-hardware/lenovo/thinkpad/l480>` |
| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `<nixos-hardware/lenovo/thinkpad/p1/3th-gen>` |
| [Lenovo ThinkPad P14s AMD Gen 1](lenovo/thinkpad/p14s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/p14s/amd/gen1>` |
| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `<nixos-hardware/lenovo/thinkpad/p14s/amd/gen2>` |
| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `<nixos-hardware/lenovo/thinkpad/p14s/amd/gen3>` |
| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `<nixos-hardware/lenovo/thinkpad/p14s/amd/gen4>` |
| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen1>` |
| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `<nixos-hardware/lenovo/thinkpad/p1>` |
| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `<nixos-hardware/lenovo/thinkpad/p50>` |
@ -200,6 +205,7 @@ See code for all available configurations.
| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/t14/amd/gen1>` |
| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `<nixos-hardware/lenovo/thinkpad/t14/amd/gen2>` |
| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `<nixos-hardware/lenovo/thinkpad/t14/amd/gen3>` |
| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `<nixos-hardware/lenovo/thinkpad/t14/amd/gen4>` |
| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `<nixos-hardware/lenovo/thinkpad/t14>` |
| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/t14s/amd/gen1>` |
| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `<nixos-hardware/lenovo/thinkpad/t14s>` |
@ -266,6 +272,7 @@ See code for all available configurations.
| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `<nixos-hardware/nxp/imx8mq-evk>` |
| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `<nixos-hardware/hardkernel/odroid-hc4>` |
| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `<nixos-hardware/hardkernel/odroid-h3>` |
| [Omen 15-en0010ca](omen/14-fb0798ng) | `<nixos-hardware/omen/14-fb0798ng>` |
| [Omen 15-en0010ca](omen/15-en0010ca) | `<nixos-hardware/omen/15-en0010ca>` |
| [Omen 16-n0005ne](omen/16-n0005ne) | `<nixos-hardware/omen/16-n0005ne>` |
| [Omen 15-en1007sa](omen/15-en1007sa) | `<nixos-hardware/omen/15-en1007sa>` |

View file

@ -5,11 +5,11 @@ let
patchRepo = fetchFromGitHub {
owner = "t2linux";
repo = "linux-t2-patches";
rev = "7cd298e227e95bac9a704ffc8f5ff5e89a1bf4d7";
hash = "sha256-Oi3CwQl0IwdVc9w+pbmJjBnyqwLFhbqFwxs5o0mqtbE=";
rev = "8b0e51ea87f170c559c9e2f437f85367838c2fad";
hash = "sha256-4YFaLW4WTKdFysIJHnshEaqoiKBFegnZiw4Kv88LjIA=";
};
version = "6.7.7";
version = "6.9";
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
in
buildLinux (args // {
@ -22,7 +22,7 @@ buildLinux (args // {
src = runCommand "patched-source" {} ''
cp -r ${fetchzip {
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
hash = "sha256-j+Ufl6C1Mqjthk18GPt2e7j+i7viauOgNnVy9dJSgaM=";
hash = "sha256-RIxLyvF5kw/to8MjAUq2iQ4X0bGk7FY+ovE3zd0eKxM=";
}} $out
chmod -R u+w $out
cd $out

View file

@ -1,21 +1,47 @@
{ lib, pkgs, ... }:
{
lib,
pkgs,
config,
...
}: {
imports = [
../../common/cpu/amd
../../common/cpu/amd/raphael/igpu.nix
../../common/cpu/amd/pstate.nix
../../common/gpu/nvidia
../../common/gpu/nvidia/prime-sync.nix
../../common/gpu/nvidia/prime.nix
../../common/hidpi.nix
../../common/pc/laptop
../../common/pc/ssd
../battery.nix
];
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") pkgs.linuxPackages_latest;
hardware.nvidia.prime = {
# The bottom 2 parts are taken from the framework 16-inch laptops configurations.
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"];
# AMD has better battery life with PPD over TLP:
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
services.power-profiles-daemon.enable = lib.mkDefault true;
# Adds the missing asus functionality to Linux.
# https://asus-linux.org/manual/asusctl-manual/
services = {
asusd = {
enable = lib.mkDefault true;
enableUserService = lib.mkDefault true;
};
};
hardware.nvidia = {
modesetting.enable = lib.mkDefault true;
open = lib.mkDefault false;
nvidiaSettings = lib.mkDefault true;
prime = {
amdgpuBusId = "PCI:54:0:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}

View file

@ -0,0 +1,10 @@
{ lib, config, ... }:
{
# Enables the zenpower sensor in lieu of the k10temp sensor on Zen CPUs https://git.exozy.me/a/zenpower3
# On Zen CPUs zenpower produces much more data entries
imports = [ ./. ];
boot.blacklistedKernelModules = [ "k10temp" ];
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
boot.kernelModules = [ "zenpower" ];
}

View file

@ -21,6 +21,12 @@
libvdpau-va-gl
intel-media-driver
];
hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; [
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
libvdpau-va-gl
intel-media-driver
];
}
];
}

View file

@ -0,0 +1,67 @@
# Dell Precision 7520
This configuration opts to use the non-free nvidia driver, as UI glitching was often observed with `nouveau` when using
a compositor.
## Device Details
- Dell Precision 7520 (07B0)
- Intel Core i7-7820HQ CPU (Kaby Lake)
- 32GB RAM
- SK hynix SC311 SATA 1TB
- Intel HD Graphics 630 (Coffee Lake)
- NVIDIA GM206GLM [Quadro M2200 Mobile]
## Tested Hardware
```bash
lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5910] (rev 05)
00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 05)
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:591b] (rev 04)
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 05)
00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31)
00:14.2 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem [8086:a131] (rev 31)
00:15.0 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #0 [8086:a160] (rev 31)
00:15.1 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #1 [8086:a161] (rev 31)
00:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31)
00:17.0 RAID bus controller [0104]: Intel Corporation SATA Controller [RAID mode] [8086:2822] (rev 31)
00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #2 [8086:a111] (rev f1)
00:1c.2 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3 [8086:a112] (rev f1)
00:1c.4 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #5 [8086:a114] (rev f1)
00:1f.0 ISA bridge [0601]: Intel Corporation CM238 Chipset LPC/eSPI Controller [8086:a154] (rev 31)
00:1f.2 Memory controller [0580]: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller [8086:a121] (rev 31)
00:1f.3 Audio device [0403]: Intel Corporation CM238 HD Audio Controller [8086:a171] (rev 31)
00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31)
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (5) I219-LM [8086:15e3] (rev 31)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM206GLM [Quadro M2200 Mobile] [10de:1436] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GM206 High Definition Audio Controller [10de:0fba] (rev a1)
02:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)
04:00.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02)
05:00.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02)
05:01.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02)
05:02.0 PCI bridge [0604]: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] [8086:15da] (rev 02)
3c:00.0 USB controller [0c03]: Intel Corporation JHL6340 Thunderbolt 3 USB 3.1 Controller (C step) [Alpine Ridge 2C 2016] [8086:15db] (rev 02)
```
## Doesn't work
- External monitor for luks passphrase entry
## Firmware Upgrades
Note that this device is supported by fwupd. To perform firmware upgrades just activate the service:
```nix
services.fwupd.enable = true;
```
Then use `fwupdmgr` to perform updates
## Nvidia Driver
The choice of the `legacy_390` driver is based on looking for PCI Device ID `10de:1436`. On the [nvidia driver site](https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/) which should indicate the
driver, the exact device isn't listed. However, we can see
[here](https://linux-hardware.org/?id=pci:10de-1436-103c-1909) has nvidia driver "375.82 and newer" listed. Since the
newest nvidia drivers don't support legacy devices, the closest version newer than 375.82 was chosen.

View file

@ -0,0 +1,50 @@
{
config,
lib,
pkgs,
inputs,
...
}: {
imports = [
../../../common/cpu/intel/kaby-lake
../../../common/pc/laptop
../../../common/pc/laptop/ssd
../../../common/gpu/nvidia
];
hardware.enableRedistributableFirmware = lib.mkDefault true;
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot = {
kernelModules = ["kvm-intel"];
blacklistedKernelModules = ["nouveau"];
};
boot.kernelParams = ["i915.modeset=1"];
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
nvidiaSettings = lib.mkDefault true;
modesetting.enable = lib.mkDefault true;
open = lib.mkDefault false;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
hardware.opengl = {
enable = lib.mkDefault true;
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
};
# Override the intel gpu driver setting imported above
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkOverride 990 "nvidia");
};
services.thermald.enable = lib.mkDefault true;
# available cpufreq governors: performance powersave
# The powersave mode locks the cpu to a 900mhz frequency which is not ideal
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

@ -47,6 +47,7 @@
dell-poweredge-r7515 = import ./dell/poweredge/r7515;
dell-precision-3541 = import ./dell/precision/3541;
dell-precision-5530 = import ./dell/precision/5530;
dell-precision-7520 = import ./dell/precision/7520;
dell-xps-13-7390 = import ./dell/xps/13-7390;
dell-xps-13-9300 = import ./dell/xps/13-9300;
dell-xps-13-9310 = import ./dell/xps/13-9310;
@ -69,6 +70,7 @@
dell-xps-15-9560 = import ./dell/xps/15-9560;
dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel;
dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia;
dell-xps-15-9570 = import ./dell/xps/15-9570;
dell-xps-15-9570-intel = import ./dell/xps/15-9570/intel;
dell-xps-15-9570-nvidia = import ./dell/xps/15-9570/nvidia;
dell-xps-17-9700-intel = import ./dell/xps/17-9700/intel;
@ -111,6 +113,7 @@
lenovo-legion-16arha7 = import ./lenovo/legion/16arha7;
lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6;
lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h;
lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5;
lenovo-legion-y530-15ich = import ./lenovo/legion/15ich;
lenovo-thinkpad = import ./lenovo/thinkpad;
lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475;
@ -125,7 +128,10 @@
lenovo-thinkpad-l480 = import ./lenovo/thinkpad/l480;
lenovo-thinkpad-p1 = import ./lenovo/thinkpad/p1;
lenovo-thinkpad-p1-gen3 = import ./lenovo/thinkpad/p1/3th-gen;
lenovo-thinkpad-p14s-amd-gen1 = import ./lenovo/thinkpad/p14s/amd/gen1;
lenovo-thinkpad-p14s-amd-gen2 = import ./lenovo/thinkpad/p14s/amd/gen2;
lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3;
lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4;
lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1;
lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50;
lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51;
@ -135,6 +141,7 @@
lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1;
lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2;
lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3;
lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4;
lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s;
lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1;
lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410;
@ -205,6 +212,7 @@
nxp-imx8qm-mek = import ./nxp/imx8qm-mek;
hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4;
hardkernel-odroid-h3 = import ./hardkernel/odroid-h3;
omen-14-fb0798ng = import ./omen/14-fb0798ng;
omen-15-en0010ca = import ./omen/15-en0010ca;
omen-16-n0005ne = import ./omen/16-n0005ne;
omen-15-en1007sa = import ./omen/15-en1007sa;
@ -241,6 +249,7 @@
common-cpu-amd = import ./common/cpu/amd;
common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix;
common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix;
common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix;
common-cpu-intel = import ./common/cpu/intel;
common-cpu-intel-comet-lake = import ./common/cpu/intel/comet-lake;

View file

@ -1,6 +1,6 @@
## Introduction
This configuration includes a fix to get audio playing over the speakers, however, the volume is low. If you know of a workaround or fix, please contribute it to the repo!!
This configuration includes a fix to get the speakers working on kernels earlier than 6.9.0. Kernels after 6.9.0 already have this patch built-in.
## Setup at the time of testing
```

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
let
lenovo-speaker-fix = pkgs.callPackage ./audio/lenovo-16ARHA7_speaker-fix.nix {
@ -14,7 +14,8 @@ in
../../../common/pc/laptop/ssd
];
boot.extraModulePackages = [ lenovo-speaker-fix ];
# Kernel 6.9 includes the speaker fix, so only install this on systems with older kernels.
boot.extraModulePackages = lib.mkIf (!(lib.versionOlder config.boot.kernelPackages.kernel.version "6.9")) [ lenovo-speaker-fix ];
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
services.xserver.dpi = 189;

View file

View file

@ -0,0 +1,12 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/amd
../../../common/gpu/nvidia
../../../common/pc/ssd
];
# TPM2 module
security.tpm2.enable = true;
}

View file

@ -0,0 +1,12 @@
{ lib, pkgs, ... }:
{
imports = [
../.
../../../../common/cpu/amd
../../../../common/gpu/amd
];
# For support of newer AMD GPUs, backlight and internal microphone
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,5 @@
{
imports = [
../.
];
}

View file

@ -1,9 +1,8 @@
{ lib, pkgs, config, ... }:
{
imports = [
../../../../../common/pc/laptop/acpi_call.nix
../../../../../common/cpu/amd
../../../../../common/gpu/amd
../.
../../../../../common/cpu/amd/pstate.nix
];
# For suspending to RAM, set Config -> Power -> Sleep State to "Linux" in EFI.

View file

@ -0,0 +1,12 @@
{ lib, pkgs, ... }:
{
imports = [
../.
../../../../../common/cpu/amd/pstate.nix
];
# For the Qualcomm NFA-725A (Device 1103) wireless network controller
# See https://bugzilla.redhat.com/show_bug.cgi?id=2047878
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,11 @@
{ lib, pkgs, config, ... }:
{
imports = [
../.
../../../../../common/cpu/amd/pstate.nix
];
# For the Qualcomm NFA765 [17cb:1103] wireless network controller
# See https://bugzilla.redhat.com/show_bug.cgi?id=2047878
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,22 @@
{ lib, pkgs, ... }:
{
# P14s is a rebadged T14 with slight internal differences.
# This may change for future models, so we duplicate the T14 hierarchy here.
imports = [
../.
../../../common/pc/laptop/acpi_call.nix
../../../common/pc/laptop/ssd
];
# Force use of the amdgpu driver for backlight control on kernel versions where the
# native backlight driver is not already preferred. This is preferred over the
# "vendor" setting, in this case the thinkpad_acpi driver.
# See https://hansdegoede.livejournal.com/27130.html
# See https://lore.kernel.org/linux-acpi/20221105145258.12700-1-hdegoede@redhat.com/
boot.kernelParams = lib.mkIf (lib.versionOlder pkgs.linux.version "6.2") [ "acpi_backlight=native" ];
# see https://github.com/NixOS/nixpkgs/issues/69289
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;
}

View file

@ -3,6 +3,7 @@
{
imports = [
../.
../../../../../common/cpu/amd/pstate.nix
];
# For support of MEDIATEK Corp. Device 7961 wireless network controller, see https://lwn.net/Articles/843303/

View file

@ -3,6 +3,7 @@
{
imports = [
../.
../../../../../common/cpu/amd/pstate.nix
];
# For the Qualcomm NFA-725A (Device 1103) wireless network controller

View file

@ -0,0 +1,12 @@
{ lib, pkgs, config, ... }:
{
imports = [
../.
../../../../../common/cpu/amd/pstate.nix
];
# For the Qualcomm NFA765 [17cb:1103] wireless network controller
# See https://bugzilla.redhat.com/show_bug.cgi?id=2047878
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;
}

View file

@ -1,17 +1,55 @@
{pkgs}:
with pkgs; let
inherit buildUBoot;
in
(buildUBoot {
pname = "imx8mp-uboot";
version = "2023.04";
src = fetchgit {
{ stdenv
, lib
, bison
, dtc
, fetchgit
, flex
, gnutls
, libuuid
, ncurses
, openssl
, which
, perl
, buildPackages
}:
let
ubsrc = fetchgit {
url = "https://github.com/nxp-imx/uboot-imx.git";
# tag: "lf-6.1.55-2.2.0"
rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f";
sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA=";
};
in
(stdenv.mkDerivation {
pname = "imx8mp-uboot";
version = "2023.04";
src = ubsrc;
postPatch = ''
patchShebangs tools
patchShebangs scripts
'';
nativeBuildInputs = [
bison
flex
openssl
which
ncurses
libuuid
gnutls
openssl
perl
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
hardeningDisable = [ "all" ];
enableParallelBuilding = true;
makeFlags = [
"DTC=${lib.getExe buildPackages.dtc}"
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
extraConfig = ''
CONFIG_USE_BOOTCOMMAND=y
@ -25,17 +63,28 @@ in
CONFIG_CMD_CACHE=y
'';
enableParallelBuilding = true;
defconfig = "imx8mp_evk_defconfig";
extraMeta.platforms = ["aarch64-linux"];
passAsFile = [ "extraConfig" ];
filesToInstall = [
"./u-boot-nodtb.bin"
"./spl/u-boot-spl.bin"
"./arch/arm/dts/imx8mp-evk.dtb"
".config"
];
})
.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl];
configurePhase = ''
runHook preConfigure
make imx8mp_evk_defconfig
cat $extraConfigPath >> .config
runHook postConfigure
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp ./u-boot-nodtb.bin $out
cp ./spl/u-boot-spl.bin $out
cp ./arch/arm/dts/imx8mp-evk.dtb $out
cp .config $out
runHook postInstall
'';
dontStrip = true;
})

View file

@ -1,17 +1,55 @@
{pkgs}:
with pkgs; let
inherit buildUBoot;
in
(buildUBoot {
pname = "imx8mq-uboot";
version = "2023.04";
src = fetchgit {
{ stdenv
, lib
, bison
, dtc
, fetchgit
, flex
, gnutls
, libuuid
, ncurses
, openssl
, which
, perl
, buildPackages
}:
let
ubsrc = fetchgit {
url = "https://github.com/nxp-imx/uboot-imx.git";
# tag: "lf-6.1.55-2.2.0"
rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f";
sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA=";
};
in
(stdenv.mkDerivation {
pname = "imx8mq-uboot";
version = "2023.04";
src = ubsrc;
postPatch = ''
patchShebangs tools
patchShebangs scripts
'';
nativeBuildInputs = [
bison
flex
openssl
which
ncurses
libuuid
gnutls
openssl
perl
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
hardeningDisable = [ "all" ];
enableParallelBuilding = true;
makeFlags = [
"DTC=${lib.getExe buildPackages.dtc}"
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
extraConfig = ''
CONFIG_USE_BOOTCOMMAND=y
@ -25,17 +63,28 @@ in
CONFIG_CMD_CACHE=y
'';
enableParallelBuilding = true;
defconfig = "imx8mq_evk_defconfig";
extraMeta.platforms = ["aarch64-linux"];
passAsFile = [ "extraConfig" ];
filesToInstall = [
"./u-boot-nodtb.bin"
"./spl/u-boot-spl.bin"
"./arch/arm/dts/imx8mq-evk.dtb"
".config"
];
})
.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl];
configurePhase = ''
runHook preConfigure
make imx8mq_evk_defconfig
cat $extraConfigPath >> .config
runHook postConfigure
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp ./u-boot-nodtb.bin $out
cp ./spl/u-boot-spl.bin $out
cp ./arch/arm/dts/imx8mq-evk.dtb $out
cp .config $out
runHook postInstall
'';
dontStrip = true;
})

View file

@ -0,0 +1,4 @@
# HP Omen 14-fb0798ng
## ACPI platform profiles
This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`.

View file

@ -0,0 +1,23 @@
{ lib, pkgs, ... }:
{
imports = [
../../common/cpu/intel
../../common/gpu/nvidia/prime.nix
../../common/pc/laptop
../../common/pc/ssd
];
# Enables ACPI platform profiles
boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") {
kernelModules = [ "hp-wmi" ];
};
# Enables Wifi and Bluetooth
hardware.enableRedistributableFirmware = true;
hardware.nvidia.prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
}