Compare commits
23 commits
surface-pr
...
lenovo-16A
Author | SHA1 | Date | |
---|---|---|---|
Aires | 98564f268e | ||
Aires | 85cc877626 | ||
d9e0b26202 | |||
f0cf568780 | |||
e85c7a78d2 | |||
81f1457023 | |||
55f8e366f0 | |||
2659a52d7a | |||
0d3eafc014 | |||
79cb5c5df6 | |||
d526edb79b | |||
050f52eb55 | |||
2a964239f6 | |||
0a944f8c68 | |||
6e7667c75d | |||
1a1fa391d5 | |||
b55712de78 | |||
ff1be1e3cd | |||
d68be3e5e2 | |||
9f7302060c | |||
772de835d5 | |||
557645a9da | |||
9fe6b53cf0 |
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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>` |
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
10
common/cpu/amd/zenpower.nix
Normal file
10
common/cpu/amd/zenpower.nix
Normal 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" ];
|
||||
}
|
|
@ -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
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
67
dell/precision/7520/README.md
Normal file
67
dell/precision/7520/README.md
Normal 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.
|
50
dell/precision/7520/default.nix
Normal file
50
dell/precision/7520/default.nix
Normal 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";
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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;
|
||||
|
|
0
lenovo/legion/t526amr5/README.md
Normal file
0
lenovo/legion/t526amr5/README.md
Normal file
12
lenovo/legion/t526amr5/default.nix
Normal file
12
lenovo/legion/t526amr5/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/amd
|
||||
../../../common/gpu/nvidia
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
|
||||
# TPM2 module
|
||||
security.tpm2.enable = true;
|
||||
}
|
12
lenovo/thinkpad/p14s/amd/default.nix
Normal file
12
lenovo/thinkpad/p14s/amd/default.nix
Normal 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;
|
||||
}
|
5
lenovo/thinkpad/p14s/amd/gen1/default.nix
Normal file
5
lenovo/thinkpad/p14s/amd/gen1/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
];
|
||||
}
|
|
@ -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.
|
||||
|
|
12
lenovo/thinkpad/p14s/amd/gen3/default.nix
Normal file
12
lenovo/thinkpad/p14s/amd/gen3/default.nix
Normal 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;
|
||||
}
|
11
lenovo/thinkpad/p14s/amd/gen4/default.nix
Normal file
11
lenovo/thinkpad/p14s/amd/gen4/default.nix
Normal 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;
|
||||
}
|
22
lenovo/thinkpad/p14s/default.nix
Normal file
22
lenovo/thinkpad/p14s/default.nix
Normal 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;
|
||||
}
|
|
@ -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/
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../../common/cpu/amd/pstate.nix
|
||||
];
|
||||
|
||||
# For the Qualcomm NFA-725A (Device 1103) wireless network controller
|
||||
|
|
12
lenovo/thinkpad/t14/amd/gen4/default.nix
Normal file
12
lenovo/thinkpad/t14/amd/gen4/default.nix
Normal 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;
|
||||
}
|
|
@ -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;
|
||||
})
|
||||
|
|
|
@ -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;
|
||||
})
|
||||
|
|
4
omen/14-fb0798ng/README.md
Normal file
4
omen/14-fb0798ng/README.md
Normal 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`.
|
23
omen/14-fb0798ng/default.nix
Normal file
23
omen/14-fb0798ng/default.nix
Normal 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";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue