Compare commits

...
Author SHA1 Message Date
Jörg Thalheim 1878da65d7 README: fix typos in the examples and make formatting more consistent 2025-03-07 05:04:17 +01:00
ccritter d201afb2e7 dell/inspiron/7559: add + corresponding Skylake architecture configuration. 2025-03-07 05:00:00 +01:00
matthiasdotsh d23a3bc3c6 surface: linux 6.12.16 -> 6.12.17 2025-03-07 03:55:14 +00:00
Cassie Cheung 009b764ac9 apple/t2: update patches for the latest kernel 2025-02-27 14:16:47 +05:30
Nicky Mouha d58f642ddb Rename dell/e7240 to dell/latitude/e7240 2025-02-24 09:01:14 +00:00
shouya 55e9685ec6 Fix Gigabyte B650 suspend issue (#1385) 2025-02-24 09:29:57 +01:00
ZHANG Yuntian bbf25ca940 radxa: allow platformFirmware to be overridable
Previously, it was a product-level option with a default value.
2025-02-24 08:22:39 +00:00
ZHANG Yuntian 9430c63e02 radxa/rock-pi-e: init 2025-02-24 08:22:39 +00:00
ZHANG Yuntian 76a98e3958 rockchip/rk3328: init 2025-02-24 08:22:39 +00:00
ZHANG Yuntian 9d5dedae84 radxa: clarify that the interface may subject to more changes
We might refactor some parts again when we add Amlogic and Allwinner supports.
2025-02-24 08:22:39 +00:00
ZHANG Yuntian 0b2e2fe9b3 rockchip: support generic firmware installation 2025-02-24 08:22:39 +00:00
ZHANG Yuntian ab84bd93a3 radxa/rock-5b: init 2025-02-24 08:22:39 +00:00
ZHANG Yuntian 28f2a7454f rockchip/rk3588: init 2025-02-24 08:22:39 +00:00
ZHANG Yuntian 79bc209be8 radxa/rock-pi-4: init 2025-02-24 08:22:39 +00:00
ZHANG Yuntian 80340dcf86 rockchip/rk3399: reverse dependency order
This order works better when we have more SoCs.
2025-02-24 08:22:39 +00:00
Andrew Kvalheim 099d38a69e lenovo/thinkpad/p16s/amd/gen2: init
Notes:

- Tested on a model 21K9CTR1WW configured with:
  - AMD Ryzen 7 PRO 7840U with Radeon 780M Graphics
  - 64 GB soldered RAM
  - WQUXGA (3840×2400) OLED display
  - Qualcomm NFA765 wireless network adapter
  - BIOS version R2FET38W (1.18)
- The user guide is shared by:
  - ThinkPad P14s Gen 4
  - ThinkPad P16s Gen 2
  - ThinkPad T14 Gen 4
  - ThinkPad T16 Gen 2
2025-02-24 08:09:24 +00:00
Louis Opter 71cca26f33 Set Alder Lake support for the Aoostar R1 N100
In order to get micro-code updates, and select the right driver for
hardware transcoding on the integrated GPU.
2025-02-24 08:09:21 +00:00
Karolis Stasaitis 8f44cbb48c raspberry-pi-4: poe-hat: add PWM polarity value 2025-02-24 08:09:17 +00:00
Laureηt fb12c8270a dell/xps/13-9315: fix screen flickering 2025-02-24 08:09:14 +00:00
Cassie Cheung cda8312060 apple/t2: format with nixfmt 2025-02-24 08:09:11 +00:00
Cassie Cheung a0252d668c apple/t2: add option to select kernel release 2025-02-24 08:09:11 +00:00
Cassie Cheung d098b09500 apple/t2: refactor kernel package, add stable kernel
Refactors the kernel package to a generic one and adds support for the
lts kernel. Since nixpkgs' kernel packages provide the `kernelPatches`
override, utilizing that ensures that kernel updates are not delayed
too much due to having to PR them to nixos-hardware separately.

This comes at the expense of possible breakage when upstream updates
something that breaks the patches.

Because the T2 Linux project has a lot of patches which changes
periodically, including them in the repository directly is a maintenance
burden. Instead, this patch comes with an update script and JSON files
containing all of the patches to be downloaded (by fetchurl) and
applied.

The NixOS option to enable changing release versions will be added in
the next commit.
2025-02-24 08:09:11 +00:00
Cassie Cheung 04be27ce49 apple/t2: update docs to remove old option
The option was removed in a previous PR but the README was not updated.
Reduce confusion by removing references to the deleted option.
2025-02-24 08:09:11 +00:00
Nicky Mouha 9b49e20140 framework/13-inch/intel-core-ultra-series1: add check for hardware.enableRedistributableFirmware (#1367) 2025-02-24 08:54:44 +01:00
Manuel Transfeld f75203cc31 common/gpu/nvidia: remove a default value (#1373)
https://github.com/NixOS/nixpkgs/pull/326369 has been merged.
2025-02-24 08:48:14 +01:00
matthiasdotsh d2483459e8 surface: linux 6.12.14 -> 6.12.16 2025-02-24 07:44:52 +00:00
Matthieu 18e9f9753e dell-xps-15-9570: fix imports, refactor (closer to recent profiles and more explicit) (#1331) 2025-02-21 05:07:31 +07:00
bashfulrobotandFelix Svensson 3e2ea8a49d feat: Add support for Dell XPS 15-9530 with NVIDIA graphics
- Added `default.nix` file for Dell XPS 15-9530 configuration
- Imported necessary files for CPU, laptop, SSD, and fingerprint
- Enabled thermald service
- Configured iwlwifi module with power saving option
- Removed commented out code for `disable_11ax` option
- Added `default.nix` file for NVIDIA configuration in Dell XPS 15-9530
- Imported `default.nix` file from parent directory and NVIDIA prime configuration file
- Configured `hardware.nvidia.prime` with Bus IDs of Intel and NVIDIA GPUs

[dell/xps/15-9530/default.nix]
- Add a new file `dell/xps/15-9530/default.nix`
- Import the following files: `../../../common/cpu/intel`, `../../../common/pc/laptop`, `../../../common/pc/laptop/ssd`, and `./fingerprint`
- Enable thermald service
- Add configuration for iwlwifi module with `options iwlwifi power_save=1`
- Remove commented out code for `disable_11ax` option
[dell/xps/15-9530/nvidia/default.nix]
- Added a new file `default.nix` in the directory `dell/xps/15-9530/nvidia/`
- The file `default.nix` includes two imports: `../default.nix` and `../../../../common/gpu/nvidia/prime.nix`
- Added a configuration for `hardware.nvidia.prime` which includes the Bus IDs of the Intel and NVIDIA GPUs.

Co-authored-by: Felix Svensson <klowdo.fs@gmail.com>
2025-02-17 13:20:39 +00:00
bashfulrobotandFelix Svensson 08c94a8b62 docs: Add README file for Dell XPS 15 9530
- Add new file `dell/xps/15-9530/README.wiki`
- Specify tested hardware
- Add notes section
- Add NVIDIA Offload section

[dell/xps/15-9530/README.wiki]
- Add a new file `dell/xps/15-9530/README.wiki`
- Specify the tested hardware:
CPU, RAM, HDD, Screen, Graphics, Input
- Add a section for notes
- Add a section for NVIDIA Offload

Co-authored-by: Felix Svensson <klowdo.fs@gmail.com>
2025-02-17 13:20:39 +00:00
⛧-440729 [sophie] e47365f377 purism/librem/5r4: kernel: 6.6.29-librem5 -> 6.6.74-librem5 2025-02-17 13:07:16 +00:00
⛧-440729 [sophie] ba37846397 purism/librem/5r4: update renamed pulseaudio option 2025-02-17 13:07:16 +00:00
matthiasdotsh 4f90da509b surface: linux 6.12.12 -> 6.12.14 2025-02-17 12:53:53 +00:00
Nicky Mouha 2eccff41ba framework/13-inch/intel-core-ultra-series1: Add Intel NPU firmware 2025-02-06 04:36:59 +00:00
Jörg Thalheim d1f201fc62 radxa: add remark about kernel. 2025-02-06 04:19:59 +00:00
ZHANG Yuntian 68cc7a876b radxa/rock-4c-plus: init 2025-02-06 04:19:59 +00:00
ZHANG Yuntian 52047449bf rockchip/rk3399: init 2025-02-06 04:19:59 +00:00
matthiasdotsh c5666d9cd6 surface: linux 6.12.11 -> 6.12.12 2025-02-06 04:19:56 +00:00
Wanja Hentze d85ec4b3c6 hardkernel/odroid-h4: init 2025-02-06 04:19:53 +00:00
aMerryElk 240f698fc8 Added profile for Dell G3 3579 laptop 2025-02-06 04:19:50 +00:00
Samuel d9819a6791 Update default.nix 2025-02-06 04:06:44 +00:00
Jörg Thalheim da7014af5d Revert "framework/13-inch/12th-gen-intel: add hdmi audio fix"
This reverts commit 8b5ef47338.

fixes https://github.com/NixOS/nixos-hardware/issues/1362

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2025-02-06 04:06:41 +00:00
Jörg Thalheim 9bdd53f590 Merge pull request #1332 from mkg20001/fwaudio
framework/13-inch/12th-gen-intel: add hdmi audio fix
2025-02-04 10:02:23 +07:00
Jörg Thalheim 537286c3c5 Merge pull request #1357 from tomfitzhenry/no-pbp-ownership
codeowners: remove tomfitzhenry from pinebook-pro
2025-02-02 11:52:41 +07:00
Tom Fitzhenry b8be6f78b0 codeowners: remove tomfitzhenry from pinebook-pro
I no longer use this.
2025-02-02 13:10:46 +11:00
XADE 34b64e4e1d dell-inspiron-3442: init 2025-02-01 06:32:00 +00:00
Cassie Cheung 21fa58535d apple/t2: kernel 6.12.4 -> 6.13 2025-02-01 06:18:21 +00:00
Cassie Cheung 95c8efc0cb apple/t2: remove apple_set_os loader option
the functionality of apple_set_os was upstreamed to the kernel a while
ago and the loader is no longer needed.
2025-02-01 06:18:21 +00:00
Joe 3009bcb058 lenovo/thinkpad/t490s: init 2025-02-01 06:18:18 +00:00
Alex Robbins dfad538f75 dell/latitude/7420: init 2025-01-24 20:47:19 +00:00
M. Ian Graham 7659093598 gpd/pocket-4: default kernel version to 6.12 to fix amdgpu error 2025-01-24 20:47:16 +00:00
Alexander Sosedkin c2aa5756c0 onenetbook/4: update stylus patch for 6.12 2025-01-24 20:47:13 +00:00
matthiasdotsh 3a123626d9 surface: linux 6.12.9 -> 6.12.11 2025-01-24 20:33:51 +00:00
Sandro cbefe8bde7 Fix doc build by adding missing defaultText 2025-01-24 20:33:48 +00:00
Jörg Thalheim 9368027715 Merge pull request #1336 from brianmcgillion/imx8-all
imx8: fix the unused module error accross all imx8
2025-01-23 01:08:30 +01:00
Brian McGillion 6209032a7c fix the unused module error accross all imx8
this fixes the unused modules error that wad introduced by https://github.com/NixOS/nixpkgs/pull/366004

Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
2025-01-23 01:45:56 +04:00
Jörg Thalheim 5f052b2663 Merge pull request #1335 from brianmcgillion/imx8-fix
nxp-imx: fix unused modules errors
2025-01-22 21:42:38 +01:00
Brian McGillion 63c0f02ce5 nxp-imx: fix unused modules errors
https://github.com/NixOS/nixpkgs/pull/366004
introduced a breaking change that if a module is declared but it is not
being used it will fail.

Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
2025-01-23 00:17:20 +04:00
Maciej Krüger 8b5ef47338 framework/13-inch/12th-gen-intel: add hdmi audio fix
See https://community.frame.work/t/hdmi-audio-output/9523/23 for more details

Tested on framework 13th gen
Would need somebody to test this on 12th gen aswell
2025-01-21 20:45:47 +01:00
Václav Klecanda 61c79181e7 feat: HP probook 440G5 config 2025-01-20 07:56:42 +00:00
BohdanQQ b539957839 update readme to mention power profile / nvidia-powerd troubleshooting 2025-01-20 07:42:40 +00:00
BohdanQQ 1f23785afe lenovo-legion-16ach6h: enable nvidia.powerd to unlock more gpu power 2025-01-20 07:42:40 +00:00
73 changed files with 1504 additions and 296 deletions

No files matched your search

-1
View File
@@ -5,7 +5,6 @@ dell/xps/15-9560 @Lyndeno
lenovo/thinkpad/x230 @makefu @yegortimoshenko
lenovo/thinkpad/x250 @Mic92
pcengines/apu @yegortimoshenko
pine64/pinebook-pro @tomfitzhenry
pine64/rockpro64 @tomfitzhenry
pine64/star64 @fgaz
purism/librem/13v3 @yegortimoshenko
+21 -5
View File
@@ -91,6 +91,7 @@ See code for all available configurations.
| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `<nixos-hardware/apple/macbook-pro/14-1>` |
| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `<nixos-hardware/apple/macmini/4>` |
| [Apple Macs with a T2 Chip](apple/t2) | `<nixos-hardware/apple/t2>` |
| [Aoostar R1 N100](aoostar/r1/n100) | `<nixos-hardware/aoostar/r1/n100>` |
| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `<nixos-hardware/asus/pro-ws-x570-ace>` |
| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `<nixos-hardware/asus/ally/rc71l>` |
| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `<nixos-hardware/asus/flow/gv302x/amdgpu>` |
@@ -118,20 +119,25 @@ See code for all available configurations.
| [Chuwi MiniBook X](chuwi/minibook-x) | `<nixos-hardware/chuwi/minibook-x>` |
| [Deciso DEC series](deciso/dec) | `<nixos-hardware/deciso/dec>` |
| [Dell G3 3779](dell/g3/3779) | `<nixos-hardware/dell/g3/3779>` |
| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `<nixos-hardawre/dell/inspiron/14-5420>` |
| [Dell G3 3579](dell/g3/3579) | `<nixos-hardware/dell/g3/3579>` |
| [Dell Inspiron 3442](dell/inspiron/3442) | `<nixos-hardware/dell/inspiron/3442>` |
| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `<nixos-hardware/dell/inspiron/14-5420>` |
| [Dell Inspiron 5509](dell/inspiron/5509) | `<nixos-hardware/dell/inspiron/5509>` |
| [Dell Inspiron 5515](dell/inspiron/5515) | `<nixos-hardware/dell/inspiron/5515>` |
| [Dell Inspiron 7405](dell/inspiron/7405) | `<nixos-hardware/dell/inspiron/7405>` |
| [Dell Inspiron 7460](dell/inspiron/7460) | `<nixos-hardware/dell/inspiron/7460>` |
| [Dell Inspiron 7559](dell/inspiron/7559) | `<nixos-hardware/dell/inspiron/7559>` |
| [Dell Latitude 3340](dell/latitude/3340) | `<nixos-hardware/dell/latitude/3340>` |
| [Dell Latitude 3480](dell/latitude/3480) | `<nixos-hardware/dell/latitude/3480>` |
| [Dell Latitude 5490](dell/latitude/5490) | `<nixos-hardware/dell/latitude/5490>` |
| [Dell Latitude 5520](dell/latitude/5520) | `<nixos-hardware/dell/latitude/5520>` |
| [Dell Latitude 7280](dell/latitude/7280) | `<nixos-hardware/dell/latitude/7280>` |
| [Dell Latitude 7390](dell/latitude/7390) | `<nixos-hardware/dell/latitude/7390>` |
| [Dell Latitude 7420](dell/latitude/7420) | `<nixos-hardware/dell/latitude/7420>` |
| [Dell Latitude 7430](dell/latitude/7430) | `<nixos-hardware/dell/latitude/7430>` |
| [Dell Latitude 7490](dell/latitude/7490) | `<nixos-hardware/dell/latitude/7490>` |
| [Dell Latitude 9430](dell/latitude/9430) | `<nixos-hardware/dell/latitude/9430>` |
| [Dell Latitude E7240](dell/latitude/e7240) | `<nixos-hardware/dell/latitude/e7240>` |
| [Dell Optiplex 3050](dell/optiplex/3050) | `<nixos-hardware/dell/optiplex/3050>` |
| [Dell Poweredge R7515](dell/poweredge/r7515) | `<nixos-hardware/dell/poweredge/r7515>` |
| [Dell Precision 3541](dell/precision/3541) | `<nixos-hardware/dell/precision/3541>` |
@@ -156,6 +162,8 @@ See code for all available configurations.
| [Dell XPS 15 9510](dell/xps/15-9510) | `<nixos-hardware/dell/xps/15-9510>` |
| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `<nixos-hardware/dell/xps/15-9520/nvidia>` |
| [Dell XPS 15 9520](dell/xps/15-9520) | `<nixos-hardware/dell/xps/15-9520>` |
| [Dell XPS 15 9530, nvidia](dell/xps/15-9520/nvidia) | `<nixos-hardware/dell/xps/15-9530/nvidia>` |
| [Dell XPS 15 9420](dell/xps/15-9520) | `<nixos-hardware/dell/xps/15-9530>` |
| [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `<nixos-hardware/dell/xps/15-9550/nvidia>` |
| [Dell XPS 15 9550](dell/xps/15-9550) | `<nixos-hardware/dell/xps/15-9550>` |
| [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `<nixos-hardware/dell/xps/15-9560/intel>` |
@@ -167,7 +175,6 @@ See code for all available configurations.
| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `<nixos-hardware/dell/xps/17-9700/intel` |
| [Dell XPS 17 9700, nvidia](dell/xps/17-9700/nvidia) | `<nixos-hardware/dell/xps/17-9700/nvidia>` |
| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `<nixos-hardware/dell/xps/17-9710/intel>` |
| [Dell XPS E7240](dell/e7240) | `<nixos-hardware/dell/e7240>` |
| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `<nixos-hardware/framework/13-inch/11th-gen-intel>` |
| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `<nixos-hardware/framework/13-inch/12th-gen-intel>` |
| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `<nixos-hardware/framework/13-inch/13th-gen-intel>` |
@@ -178,6 +185,7 @@ See code for all available configurations.
| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `<nixos-hardware/friendlyarm/nanopi-r5s>` |
| [Focus M2 Gen 1](focus/m2/gen1) | `<nixos-hardware/focus/m2/gen1>` |
| [Gigabyte B550](gigabyte/b550) | `<nixos-hardware/gigabyte/b550>` |
| [Gigabyte B650](gigabyte/b650) | `<nixos-hardware/gigabyte/b650>` |
| [GPD MicroPC](gpd/micropc) | `<nixos-hardware/gpd/micropc>` |
| [GPD P2 Max](gpd/p2-max) | `<nixos-hardware/gpd/p2-max>` |
| [GPD Pocket 3](gpd/pocket-3) | `<nixos-hardware/gpd/pocket-3>` |
@@ -191,8 +199,9 @@ See code for all available configurations.
| [HP Elitebook 845g7](hp/elitebook/845/g7) | `<nixos-hardware/hp/elitebook/845/g7>` |
| [HP Elitebook 845g8](hp/elitebook/845/g8) | `<nixos-hardware/hp/elitebook/845/g8>` |
| [HP Elitebook 845g9](hp/elitebook/845/g9) | `<nixos-hardware/hp/elitebook/845/g9>` |
| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `<nixos-hardware/hp/notebook/14-df0023>` |
| [HP Laptop 14s-dq2024nf](hp/laptop/14s-dq2024nf) | `<nixos-hardware/hp/laptop/14s-dq2024nf>` |
| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `<nixos-hardware/hp/notebook/14-df0023>` |
| [HP Probook 440G5](hp/probook/440g5) | `<nixos-hardware/hp/probook/440g5>` |
| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `<nixos-hardware/huawei/machc-wa>` |
| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `<nixos-hardware/nxp/imx8qm-mek>` |
| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `<nixos-hardware/intel/nuc/8i7beh>` |
@@ -236,6 +245,7 @@ See code for all available configurations.
| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `<nixos-hardware/lenovo/thinkpad/p14s/amd/gen4>` |
| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `<nixos-hardware/lenovo/thinkpad/p14s/intel/gen3>` |
| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen1>` |
| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen2>` |
| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `<nixos-hardware/lenovo/thinkpad/p1>` |
| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `<nixos-hardware/lenovo/thinkpad/p50>` |
| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `<nixos-hardware/lenovo/thinkpad/p51>` |
@@ -263,6 +273,7 @@ See code for all available configurations.
| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `<nixos-hardware/lenovo/thinkpad/t480>` |
| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `<nixos-hardware/lenovo/thinkpad/t480s>` |
| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `<nixos-hardware/lenovo/thinkpad/t490>` |
| [Lenovo ThinkPad T490s](lenovo/thinkpad/t490s) | `<nixos-hardware/lenovo/thinkpad/t490s>` |
| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `<nixos-hardware/lenovo/thinkpad/t495>` |
| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `<nixos-hardware/lenovo/thinkpad/t520>` |
| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `<nixos-hardware/lenovo/thinkpad/t550>` |
@@ -299,8 +310,8 @@ See code for all available configurations.
| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `<nixos-hardware/lenovo/yoga/6/13ALC6>` |
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `<nixos-hardware/lenovo/yoga/7/14ARH7/amdgpu>` |
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `<nixos-hardware/lenovo/yoga/7/14ARH7/nvidia>` |
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) |`<nixos-hardware/lenovo/yoga/7/14IAH7/integrated>` |
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) |`<nixos-hardware/lenovo/yoga/7/14IAH7/hybrid>` |
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `<nixos-hardware/lenovo/yoga/7/14IAH7/integrated>` |
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `<nixos-hardware/lenovo/yoga/7/14IAH7/hybrid>` |
| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `<nixos-hardware/lenovo/yoga/7/slim/gen8>` |
| [MSI B550-A PRO](msi/b550-a-pro) | `<nixos-hardware/msi/b550-a-pro>` |
| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `<nixos-hardware/msi/b350-tomahawk>` |
@@ -320,6 +331,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>` |
| [Hardkernel Odroid H4](hardkernel/odroid-h4/default.nix) | `<nixos-hardware/hardkernel/odroid-h4>` |
| [Omen 14-fb0798ng](omen/14-fb0798ng) | `<nixos-hardware/omen/14-fb0798ng>` |
| [Omen 15-ce002ns](omen/15-ce002ns) | `<nixos-hardware/omen/15-ce002ns>` |
| [Omen 15-en0010ca](omen/15-en0010ca) | `<nixos-hardware/omen/15-en0010ca>` |
@@ -337,6 +349,10 @@ See code for all available configurations.
| [Purism Librem 13v3](purism/librem/13v3) | `<nixos-hardware/purism/librem/13v3>` |
| [Purism Librem 15v3](purism/librem/13v3) | `<nixos-hardware/purism/librem/15v3>` |
| [Purism Librem 5r4](purism/librem/5r4) | `<nixos-hardware/purism/librem/5r4>` |
| [Radxa ROCK 4C+](radxa/rock-4c-plus) | `<nixos-hardware/radxa/rock-4c-plus>` |
| [Radxa ROCK 5 Model B](radxa/rock-5b) | `<nixos-hardware/radxa/rock-5b>` |
| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `<nixos-hardware/radxa/rock-pi-4>` |
| [Radxa ROCK Pi E](radxa/rock-pi-e) | `<nixos-hardware/radxa/rock-pi-e>` |
| [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` |
| [Raspberry Pi 3](raspberry-pi/3) | `<nixos-hardware/raspberry-pi/3>` |
| [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` |
+12
View File
@@ -0,0 +1,12 @@
{
imports = [
../../../common/cpu/intel/alder-lake
];
# lopter@(2025-02-06): according to sensors-detect this comes with an ITE
# IT8613E super io chip, which is not officialy supported yet. See also:
#
# - unofficial driver: https://github.com/frankcrawford/it87
# - reddit thread on with useful information to configure pwm from the bios:
# https://www.reddit.com/r/MiniPCs/comments/1bnkg1u/aoostar_r1r7_question_does_the_fan_header_support/
}
+2 -26
View File
@@ -8,29 +8,5 @@ Following [this guide](https://wiki.t2linux.org/distributions/nixos/installation
You can consult the [wiki](https://wiki.t2linux.org/) for information specific to T2 Macs.
## Unlocking Internal iGPU
The `apple-set-os-loader-installer` module serves as an installer for the [`apple-set-os-loader`](https://github.com/Redecorating/apple_set_os-loader). This tool is designed to unlock the internal integrated GPU (iGPU) on certain MacBooks. See https://wiki.t2linux.org/guides/hybrid-graphics/ for more details.
### What it Does:
Upon activation, this module performs the following:
- Renames the existing `BOOTX64.EFI` file to `bootx64_original.efi`.
- Installs the `apple-set-os-loader` hook in its place as `bootx64.efi`.
- Before the system boots the hook unlocks the iGPU and subsequently calls the original `bootx64_original.efi`.
- Enables the iGPU by default.
### How to Implement:
1. Add this into your `configuration.nix`:
```
hardware.apple-t2.enableAppleSetOsLoader = true;
```
2. **Rebuild your system**:
```
sudo nixos-rebuild switch
```
> **Note**: Always ensure compatibility and make backups of your data before making any system changes.
> [!warning]
> Always ensure compatibility and make backups of your data before making any system changes.
+47 -55
View File
@@ -1,6 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) types;
audioFiles = pkgs.fetchFromGitHub {
owner = "kekrby";
repo = "t2-better-audio";
@@ -8,69 +14,73 @@ let
hash = "sha256-x7K0qa++P1e1vuCGxnsFxL1d9+nwMtZUJ6Kd9e27TFs=";
};
audioFilesUdevRules = pkgs.runCommand "audio-files-udev-rules" {} ''
audioFilesUdevRules = pkgs.runCommand "audio-files-udev-rules" { } ''
mkdir -p $out/lib/udev/rules.d
cp ${audioFiles}/files/*.rules $out/lib/udev/rules.d
substituteInPlace $out/lib/udev/rules.d/*.rules --replace "/usr/bin/sed" "${pkgs.gnused}/bin/sed"
'';
overrideAudioFiles = package: pluginsPath:
package.overrideAttrs (new: old: {
preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ];
postPatchPhase = ''
cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/
'';
});
overrideAudioFiles =
package: pluginsPath:
package.overrideAttrs (
new: old: {
preConfigurePhases = old.preConfigurePhases or [ ] ++ [ "postPatchPhase" ];
postPatchPhase = ''
cp -r ${audioFiles}/files/{profile-sets,paths} ${pluginsPath}/alsa/mixer/
'';
}
);
pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/";
apple-set-os-loader-installer = pkgs.stdenv.mkDerivation {
name = "apple-set-os-loader-installer-1.0";
src = pkgs.fetchFromGitHub {
owner = "Redecorating";
repo = "apple_set_os-loader";
rev = "r33.9856dc4";
sha256 = "hvwqfoF989PfDRrwU0BMi69nFjPeOmSaD6vR6jIRK2Y=";
};
buildInputs = [ pkgs.gnu-efi ];
buildPhase = ''
substituteInPlace Makefile --replace "/usr" '$(GNU_EFI)'
export GNU_EFI=${pkgs.gnu-efi}
make
'';
installPhase = ''
install -D bootx64_silent.efi $out/bootx64.efi
'';
};
t2Cfg = config.hardware.apple-t2;
in
{
imports = [
(lib.mkRemovedOptionModule ["hardware" "apple-t2" "enableTinyDfr"] ''
(lib.mkRemovedOptionModule [ "hardware" "apple-t2" "enableTinyDfr" ] ''
The hardware.apple-t2.enableTinyDfr option was deprecated and removed since upstream Nixpkgs now has an identical module.
Please migrate to hardware.apple.touchBar.
'')
(lib.mkRemovedOptionModule [ "hardware" "apple-t2" "enableAppleSetOsLoader" ] ''
The hardware.apple-t2.enableAppleSetOsLoader option was removed as the apple_set_os functionality was integrated into the kernel.
Please uninstall the loader by replacing /esp/EFI/BOOTX64.EFI with /esp/EFI/BOOTX64_original.EFI, where esp is the EFI partition mount point.
If you have a device with an AMD dGPU and would like to keep using the iGPU, please set hardware.apple-t2.enableIGPU to true.
'')
];
options.hardware.apple-t2 = {
enableAppleSetOsLoader = lib.mkOption {
default = false;
type = lib.types.bool;
description = "Whether to enable the appleSetOsLoader activation script.";
enableIGPU = lib.mkEnableOption "the usage of the iGPU on specific Apple devices with an AMD dGPU";
kernelChannel = lib.mkOption {
type = types.enum [
"stable"
"latest"
];
default = "stable";
example = "latest";
description = "The kernel release stream to use.";
};
};
config = lib.mkMerge [
{
# For keyboard and touchbar
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2.nix { });
# Specialized kernel for keyboard, touchpad, touchbar and audio.
boot.kernelPackages = pkgs.linuxPackagesFor (
pkgs.callPackage (
if t2Cfg.kernelChannel == "stable" then ./pkgs/linux-t2 else ./pkgs/linux-t2/latest.nix
) { }
);
boot.initrd.kernelModules = [ "apple-bce" ];
services.udev.packages = [ audioFilesUdevRules ];
# For audio
boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ];
boot.kernelParams = [
"pcie_ports=compat"
"intel_iommu=on"
"iommu=pt"
];
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
@@ -82,25 +92,7 @@ in
# Make sure post-resume.service exists
powerManagement.enable = true;
}
(lib.mkIf t2Cfg.enableAppleSetOsLoader {
# Activation script to install apple-set-os-loader in order to unlock the iGPU
system.activationScripts.appleSetOsLoader = ''
if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then
true # It's already installed, no action required
elif [[ -e /boot/efi/efi/boot/bootx64.efi ]]; then
# Copy the new bootloader to a temporary location
cp ${apple-set-os-loader-installer}/bootx64.efi /boot/efi/efi/boot/bootx64_temp.efi
# Rename the original bootloader
mv /boot/efi/efi/boot/bootx64.efi /boot/efi/efi/boot/bootx64_original.efi
# Move the new bootloader to the final destination
mv /boot/efi/efi/boot/bootx64_temp.efi /boot/efi/efi/boot/bootx64.efi
else
echo "Error: /boot/efi/efi/boot/bootx64.efi is missing" >&2
fi
'';
(lib.mkIf t2Cfg.enableIGPU {
# Enable the iGPU by default if present
environment.etc."modprobe.d/apple-gmux.conf".text = ''
options apple-gmux force_igd=y
-56
View File
@@ -1,56 +0,0 @@
{ lib, buildLinux, fetchFromGitHub, fetchzip, runCommand
, ... } @ args:
let
version = "6.12.4";
majorVersion = lib.elemAt (lib.take 1 (lib.splitVersion version)) 0;
patchRepo = fetchFromGitHub {
owner = "t2linux";
repo = "linux-t2-patches";
rev = "539eea1f9127f1623794ee8c7ccc37e8b00f60a3";
hash = "sha256-pFeNOLTqnEupyEZDk+fX/5GFpobvN+L7Wv2K6V5Xx9g=";
};
kernel = fetchzip {
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
hash = "sha256-SiQzaqraT/5s6Mown8/DeOWU7VR3IG0ojvkqThO09+0=";
};
in
buildLinux (args // {
inherit version;
pname = "linux-t2";
# Snippet from nixpkgs
modDirVersion = "${lib.concatStringsSep "." (lib.take 3 (lib.splitVersion "${version}.0"))}";
src = runCommand "patched-source" {} ''
cp -r ${kernel} $out
chmod -R u+w $out
cd $out
while read -r patch; do
echo "Applying patch $patch";
patch -p1 < $patch;
done < <(find ${patchRepo} -type f -name "*.patch" | sort)
'';
structuredExtraConfig = with lib.kernel; {
APPLE_BCE = module;
APPLE_GMUX = module;
APFS_FS = module;
BRCMFMAC = module;
BT_BCM = module;
BT_HCIBCM4377 = module;
BT_HCIUART_BCM = yes;
BT_HCIUART = module;
HID_APPLETB_BL = module;
HID_APPLETB_KBD = module;
HID_APPLE = module;
DRM_APPLETBDRM = module;
HID_SENSOR_ALS = module;
SND_PCM = module;
STAGING = yes;
};
kernelPatches = [];
} // (args.argsOverride or {}))
+6
View File
@@ -0,0 +1,6 @@
{ callPackage, linux_6_12, ... }@args:
callPackage ./generic.nix args {
kernel = linux_6_12;
patchesFile = ./stable.json;
}
+59
View File
@@ -0,0 +1,59 @@
{
lib,
fetchurl, # fetchpatch does unnecessary normalization
...
}@args:
{
kernel,
patchesFile,
}:
let
inherit (builtins) readFile fromJSON;
patchset = fromJSON (readFile patchesFile);
t2-patches = map (
{ name, hash }:
{
inherit name;
patch = fetchurl {
inherit name hash;
url = patchset.base_url + name;
};
}
) patchset.patches;
in
kernel.override (
args
// {
pname = "linux-t2";
structuredExtraConfig = with lib.kernel; {
APPLE_BCE = module;
APPLE_GMUX = module;
APFS_FS = module;
BRCMFMAC = module;
BT_BCM = module;
BT_HCIBCM4377 = module;
BT_HCIUART_BCM = yes;
BT_HCIUART = module;
HID_APPLETB_BL = module;
HID_APPLETB_KBD = module;
HID_APPLE = module;
DRM_APPLETBDRM = module;
HID_SENSOR_ALS = module;
SND_PCM = module;
STAGING = yes;
};
kernelPatches = t2-patches ++ (args.kernelPatches or [ ]);
argsOverride.extraMeta = {
description = "The Linux kernel (with patches from the T2 Linux project)";
# take responsibility for the downstream kernel
maintainers = with lib.maintainers; [ soopyc ];
};
}
// (args.argsOverride or { })
)
+113
View File
@@ -0,0 +1,113 @@
{
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/73bbcb413e8c9294c27ec9b53f84d8b19ecd3f05/",
"patches": [
{
"name": "1001-Add-apple-bce-driver.patch",
"hash": "sha256-e3RPvWPj2QASGOS4kieO8YFekrXsBCJtfF82OPlOn2E="
},
{
"name": "1002-Put-apple-bce-in-drivers-staging.patch",
"hash": "sha256-wkveNo1qwAwXWDGTFed4ZDbuBnJbwKgWLmTHK9qq0oM="
},
{
"name": "1005-HID-hid-appletb-bl-add-driver-for-the-backlight-of-A.patch",
"hash": "sha256-kEscS1FAyDxLZPOPInYTXFEf4fouBEa4zGctX14hSu8="
},
{
"name": "1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch",
"hash": "sha256-eVEuvnoRItaDjwWu41nn9bTkgHgY+1SL/hFAvUR2IlY="
},
{
"name": "1007-HID-multitouch-support-getting-the-contact-ID-from.patch",
"hash": "sha256-A4tExJafroVAv/Hbdt7farJM6RYl/DU5KwSbzqcdEVY="
},
{
"name": "1008-HID-multitouch-support-getting-the-tip-state-from-HI.patch",
"hash": "sha256-GwK+d87p3UMy66037dzq6/Zearj8gnRHhqSdZczRadY="
},
{
"name": "1009-HID-multitouch-take-cls-maxcontacts-into-account-for.patch",
"hash": "sha256-fywzHnCQ657UFye1ckiufral3pBwBGtKdxWqWqaFHM0="
},
{
"name": "1010-HID-multitouch-allow-specifying-if-a-device-is-direc.patch",
"hash": "sha256-87SOnLgeG60Svu2Z9QUyP9P6cZ1Gznt6ZYLFImfx+vY="
},
{
"name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bars.patch",
"hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0="
},
{
"name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch",
"hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ="
},
{
"name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch",
"hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo="
},
{
"name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch",
"hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI="
},
{
"name": "2008-i915-4-lane-quirk-for-mbp15-1.patch",
"hash": "sha256-f/PTDwRGEyVkGHFyypTKi+gIni3R4TmcsOneGc7Ay5A="
},
{
"name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch",
"hash": "sha256-XKwlyJZjJLQz39mc0/S7sPnRnwrqMsq9OKy+QCO+oho="
},
{
"name": "3001-applesmc-convert-static-structures-to-drvdata.patch",
"hash": "sha256-7KGC0pCos351wKNhwJI/Qoc7w+orOPpiTkdCN50G8nI="
},
{
"name": "3002-applesmc-make-io-port-base-addr-dynamic.patch",
"hash": "sha256-1fnmMP/3WSy2JqjdCvxu8tWoshCPr8eiG6ttYK/N9WA="
},
{
"name": "3003-applesmc-switch-to-acpi_device-from-platform.patch",
"hash": "sha256-3S6BzyoPLoirfyAu4yDyE9aYjUYr/7etmAvN3uKSDLE="
},
{
"name": "3004-applesmc-key-interface-wrappers.patch",
"hash": "sha256-9Bq28WcqiOnef0br6bATOudr1ViSpajQs7fv7o8Tg0I="
},
{
"name": "3005-applesmc-basic-mmio-interface-implementation.patch",
"hash": "sha256-Hh9DymQ+Y74oSs1zv9F0lTU3jfAenKTM+cmFH9tmN9Q="
},
{
"name": "3006-applesmc-fan-support-on-T2-Macs.patch",
"hash": "sha256-D5IQHE8QFo49mnUawSau7xUsMFkHKayyhnHW4hi+fWE="
},
{
"name": "3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch",
"hash": "sha256-rLDuyQYzAaWuu/u6nRRVvGdwyfpLvkGPu1OoD8KS0os="
},
{
"name": "3008-applesmc-make-applesmc_remove-void.patch",
"hash": "sha256-j2Rj1PW/bFEYh9IkGkkG9b+G27IAPCInyd828z4WE1s="
},
{
"name": "3009-applesmc-battery-charge-limiter.patch",
"hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns="
},
{
"name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch",
"hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc="
},
{
"name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch",
"hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M="
},
{
"name": "8001-Add-APFS-driver.patch",
"hash": "sha256-40Gl8eR9RB6qEoU+vY7+sVWms8e566OUmAb9LZWZK3w="
},
{
"name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch",
"hash": "sha256-n1SH5vC//LRJdWOavH9/BHqBTjkUj5f+dFGitSeHksw="
}
]
}
+6
View File
@@ -0,0 +1,6 @@
{ callPackage, linux_6_13, ... }@args:
callPackage ./generic.nix args {
kernel = linux_6_13;
patchesFile = ./latest.json;
}
+113
View File
@@ -0,0 +1,113 @@
{
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/19c29ff4bbda9f512b7b69d63d249de269dc66ab/",
"patches": [
{
"name": "1001-Add-apple-bce-driver.patch",
"hash": "sha256-e3RPvWPj2QASGOS4kieO8YFekrXsBCJtfF82OPlOn2E="
},
{
"name": "1002-Put-apple-bce-in-drivers-staging.patch",
"hash": "sha256-DXj4CmE7TKMGrAhQDOR5RVw9YHmyQMiXZsmxYfkKAEA="
},
{
"name": "1005-HID-hid-appletb-bl-add-driver-for-the-backlight-of-A.patch",
"hash": "sha256-kEscS1FAyDxLZPOPInYTXFEf4fouBEa4zGctX14hSu8="
},
{
"name": "1006-HID-hid-appletb-kbd-add-driver-for-the-keyboard-mode.patch",
"hash": "sha256-eVEuvnoRItaDjwWu41nn9bTkgHgY+1SL/hFAvUR2IlY="
},
{
"name": "1007-HID-multitouch-support-getting-the-contact-ID-from.patch",
"hash": "sha256-A4tExJafroVAv/Hbdt7farJM6RYl/DU5KwSbzqcdEVY="
},
{
"name": "1008-HID-multitouch-support-getting-the-tip-state-from-HI.patch",
"hash": "sha256-GwK+d87p3UMy66037dzq6/Zearj8gnRHhqSdZczRadY="
},
{
"name": "1009-HID-multitouch-take-cls-maxcontacts-into-account-for.patch",
"hash": "sha256-fywzHnCQ657UFye1ckiufral3pBwBGtKdxWqWqaFHM0="
},
{
"name": "1010-HID-multitouch-allow-specifying-if-a-device-is-direc.patch",
"hash": "sha256-87SOnLgeG60Svu2Z9QUyP9P6cZ1Gznt6ZYLFImfx+vY="
},
{
"name": "1011-HID-multitouch-add-device-ID-for-Apple-Touch-Bars.patch",
"hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0="
},
{
"name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch",
"hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ="
},
{
"name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch",
"hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo="
},
{
"name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch",
"hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI="
},
{
"name": "2008-i915-4-lane-quirk-for-mbp15-1.patch",
"hash": "sha256-lZ7MWXZubmAlJCqBmuzueg7agENJbikxP1SE46SmwNw="
},
{
"name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch",
"hash": "sha256-XKwlyJZjJLQz39mc0/S7sPnRnwrqMsq9OKy+QCO+oho="
},
{
"name": "3001-applesmc-convert-static-structures-to-drvdata.patch",
"hash": "sha256-7KGC0pCos351wKNhwJI/Qoc7w+orOPpiTkdCN50G8nI="
},
{
"name": "3002-applesmc-make-io-port-base-addr-dynamic.patch",
"hash": "sha256-1fnmMP/3WSy2JqjdCvxu8tWoshCPr8eiG6ttYK/N9WA="
},
{
"name": "3003-applesmc-switch-to-acpi_device-from-platform.patch",
"hash": "sha256-3S6BzyoPLoirfyAu4yDyE9aYjUYr/7etmAvN3uKSDLE="
},
{
"name": "3004-applesmc-key-interface-wrappers.patch",
"hash": "sha256-9Bq28WcqiOnef0br6bATOudr1ViSpajQs7fv7o8Tg0I="
},
{
"name": "3005-applesmc-basic-mmio-interface-implementation.patch",
"hash": "sha256-Hh9DymQ+Y74oSs1zv9F0lTU3jfAenKTM+cmFH9tmN9Q="
},
{
"name": "3006-applesmc-fan-support-on-T2-Macs.patch",
"hash": "sha256-D5IQHE8QFo49mnUawSau7xUsMFkHKayyhnHW4hi+fWE="
},
{
"name": "3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch",
"hash": "sha256-rLDuyQYzAaWuu/u6nRRVvGdwyfpLvkGPu1OoD8KS0os="
},
{
"name": "3008-applesmc-make-applesmc_remove-void.patch",
"hash": "sha256-j2Rj1PW/bFEYh9IkGkkG9b+G27IAPCInyd828z4WE1s="
},
{
"name": "3009-applesmc-battery-charge-limiter.patch",
"hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns="
},
{
"name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch",
"hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc="
},
{
"name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch",
"hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M="
},
{
"name": "8001-Add-APFS-driver.patch",
"hash": "sha256-RjEhzCqGvwRSGFjMgg1Z1kFwbxB9VT3SkVKoOdtDvP0="
},
{
"name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch",
"hash": "sha256-n1SH5vC//LRJdWOavH9/BHqBTjkUj5f+dFGitSeHksw="
}
]
}
+93
View File
@@ -0,0 +1,93 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python -p nix -p "python3.withPackages (p: [p.requests])"
import argparse
import json
import re
import subprocess
import sys
from tempfile import NamedTemporaryFile
import requests
API_BASE = "https://api.github.com"
PATCH_PATTERN = re.compile(r"^\d{4}-.*\.patch$")
parser = argparse.ArgumentParser(
description="Update linux-t2 patches from a GitHub repository."
)
parser.add_argument("filename", help="the output filename")
parser.add_argument(
"--repository",
help="the source github repository",
default="t2linux/linux-t2-patches",
nargs="?",
)
ref_group = parser.add_mutually_exclusive_group()
ref_group.add_argument(
"--reference", help="the git reference for the patches", default=None, nargs="?"
)
ref_group.add_argument(
"--branch", help="the git branch to fetch", default=None, nargs="?"
)
def get_api(endpoint, *args, **kwargs):
kwargs["headers"] = {"X-GitHub-Api-Version": "2022-11-28"}
response = requests.get(API_BASE + endpoint, *args, **kwargs)
response.raise_for_status()
return response.json()
def get_sri_hash(data: bytes):
with NamedTemporaryFile() as tmpfile:
tmpfile.write(data)
tmpfile.flush()
proc = subprocess.run(
["nix-hash", "--sri", "--flat", "--type", "sha256", tmpfile.name],
check=True,
capture_output=True,
)
return proc.stdout.decode("utf8").strip()
def main():
args = parser.parse_args()
reference = args.reference
branch = args.branch
if reference is None:
if branch is None:
print("Branch and reference not provided, fetching default branch")
branch = get_api(f"/repos/{args.repository}")["default_branch"]
print(f"Reference not provided, fetching from branch {branch}")
branch_data = get_api(f"/repos/{args.repository}/branches/{branch}")
reference = branch_data["commit"]["sha"]
print(f"Repository: {args.repository}")
print(f" Reference: {reference}")
base_url = f"https://raw.githubusercontent.com/{args.repository}/{reference}/"
contents = get_api(f"/repos/{args.repository}/contents", {"ref": reference})
patches = filter(lambda e: PATCH_PATTERN.match(e.get("name")), contents)
patches_with_hash = []
for patch in patches:
patch_content = requests.get(patch["download_url"])
patch_hash = get_sri_hash(patch_content.content)
print(f"{patch['name']}: {patch_hash}")
patches_with_hash.append({"name": patch["name"], "hash": patch_hash})
result = {"base_url": base_url, "patches": patches_with_hash}
with open(args.filename, "w+") as f:
json.dump(result, f, indent=2)
f.write("\n") # write final newline
print(f"Wrote to {args.filename}")
return 0
if __name__ == "__main__":
sys.exit(main())
-3
View File
@@ -30,9 +30,6 @@ in {
amdgpu.initrd.enable = mkDefault true;
nvidia = {
#to avoid problems with gnome 47 vulkan
package = mkDefault config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true;
nvidiaSettings = mkDefault true;
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
../cpu-only.nix
];
}
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
./cpu-only.nix
../../../gpu/intel/skylake
];
}
+18
View File
@@ -0,0 +1,18 @@
{ pkgs, ... }:
{
imports = [ ../. ];
boot.kernelParams = [
"i915.enable_guc=2"
];
# VP9 decoding not supported when using intel-media-driver
# https://github.com/intel/media-driver/issues/1024
# NixOS Wiki recommends using the legacy intel-vaapi-driver with the hybrid codec over that one for Skylake.
# https://wiki.nixos.org/wiki/Accelerated_Video_Playback
hardware.intelgpu = {
vaapiDriver = "intel-vaapi-driver";
enableHybridCodec = true;
};
}
-2
View File
@@ -3,6 +3,4 @@
{
imports = [ ../24.05-compat.nix ];
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
# TODO: this will be a default after https://github.com/NixOS/nixpkgs/pull/326369
hardware.nvidia.modesetting.enable = lib.mkDefault true;
}
+9 -2
View File
@@ -1,6 +1,13 @@
{
imports = [
../../common/cpu/intel
../../common/pc/laptop
../latitude/e7240/default.nix
];
warnings = [
''
DEPRECATED: Importing dell/e7240 is deprecated. Use dell/latitude/e7240 instead.
This module will be removed in a future release.
''
];
}
+32
View File
@@ -0,0 +1,32 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/intel/coffee-lake
../../../common/gpu/nvidia/prime.nix
../../../common/gpu/nvidia/pascal
../../../common/pc/laptop
../../../common/pc/laptop/ssd
];
# Specify bus id of Nvidia and Intel graphics
hardware.nvidia.prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
# Cooling management
services.thermald.enable = lib.mkDefault true;
boot = {
# Use same ACPI identifier as Dell Ubuntu
kernelParams = [ "acpi_osi=Linux-Dell-Video" ];
# Enable fan sensors.
kernelModules = [ "dell-smm-hwmon" ];
# Forces the driver to load on unknown hardware
extraModprobeConfig = "options dell-smm-hwmon ignore_dmi=1";
# NOTE: PWM fan control compatibility needs explicit whitelisting in the kernel driver's code.
};
}
+35
View File
@@ -0,0 +1,35 @@
## Dell Inspiron 3442
### Tested Hardware
```shellsession
$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Haswell-ULT DRAM Controller [8086:0a04] (rev 0b)
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b)
00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)
00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04)
00:16.0 Communication controller [0780]: Intel Corporation 8 Series HECI #0 [8086:9c3a] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 1 [8086:9c10] (rev e4)
00:1c.2 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 3 [8086:9c14] (rev e4)
00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 4 [8086:9c16] (rev e4)
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series USB EHCI #1 [8086:9c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation 8 Series LPC Controller [8086:9c45] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] [8086:9c03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 8 Series SMBus Controller [8086:9c22] (rev 04)
06:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01)
07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller [10ec:8136] (rev 07)
```
### Extra Configuration
#### Bluetooth
To enable bluetooth support, set `hardware.bluetooth.enable = true;`.
### Firmware Upgrades
This device is partially supported by [fwupd](https://fwupd.org).
Use `fwupdmgr` to perform updates.
+22
View File
@@ -0,0 +1,22 @@
{ config, lib, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
../../../common/gpu/intel/haswell
];
hardware.enableAllFirmware = lib.mkDefault true;
services = {
fwupd.enable = lib.mkDefault true;
thermald.enable = lib.mkDefault true;
};
boot = {
# needs to be explicitly loaded or else bluetooth/wifi won't work.
kernelModules = [ "wl" ];
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
};
}
+58
View File
@@ -0,0 +1,58 @@
## Dell Inspiron 7559
### Tested Hardware
```shellsession
$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:1910] (rev 07)
00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) [8086:1905] (rev 07)
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06)
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 07)
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:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31)
00:17.0 SATA controller [0106]: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] [8086:a103] (rev 31)
00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 [8086:a110] (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:1c.5 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #6 [8086:a115] (rev f1)
00:1c.6 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #7 [8086:a116] (rev f1)
00:1f.0 ISA bridge [0601]: Intel Corporation HM170 Chipset LPC/eSPI Controller [8086:a14e] (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 100 Series/C230 Series Chipset Family HD Audio Controller [8086:a170] (rev 31)
00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31)
02:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] [10de:139b] (rev a2)
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
05:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 79)
06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01)
```
### Extra Configuration
#### Bluetooth
To enable bluetooth support, set `hardware.bluetooth.enable = true;`.
#### Prime Offloading
This configuration uses Nvidia Prime offloading, which allows use of the `nvidia-offload` script for running commands on the dGPU. For example, you can instruct Steam to launch a game offloaded to the GPU by setting the launch options for that game to `nvidia-offload %command%`.
#### SSD
This laptop has an optional M.2 SSD slot, which isn't accounted for here. If you are using the SSD, you could look into implementing the options in [ssd](common/pc/laptop/ssd) manually. Some sources also say you should ensure your SATA Mode is set to AHCI in your BIOS for it to be detected, however I think this is a prerequisite to installing Linux on this laptop in the first place so you probably already have that set.
#### Subwoofer
Tested with the default PipeWire configuration on Plasma, the subwoofer appears to work depending on the device Profile in sound settings ("Analog Stereo Duplex" works best for me). I have had issues with it in the past on other distros, so if it's not working on your system you could try the solution in [this thread](https://bbs.archlinux.org/viewtopic.php?id=207222).
#### Other issues
There are plenty of documented bugs and threads around issues on Dell laptops like this. Some of them stem from using the nouveau drivers, but we're using the proprietary Nvidia drivers here. Some things to look into if you're experiencing issues:
* I/O is slow: `nouveau` could be added as a kernel blocklist item: searching this repo shows other laptops with this configuration
* Power drain while sleeping: add the following as boot.kernelParams: `"mem_sleep_default=deep"`
* Issues coming back from suspend (particularly if the previous kernelParam is applied): add the following as boot.kernelParams: `"acpi_rev_override=1"` `"acpi_osi=Linux"`
* I also spotted [one person recommending](https://connorkuehl.github.io/dell-inspiron-7559-linux-guide/) setting just `"acpi_osi="`. This article is quite old though and I haven't tested the difference.
* Brightness function keys don't work: add the following as boot.kernelParams: `"acpi_backlight=vendor"` or `"acpi_backlight=native"`
+24
View File
@@ -0,0 +1,24 @@
{ lib, ... }:
{
imports = [
../../../common/pc/laptop
../../../common/pc/laptop/hdd
../../../common/cpu/intel/skylake
../../../common/gpu/nvidia/maxwell
../../../common/gpu/nvidia/prime.nix
];
hardware = {
nvidia.prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:2:0:0";
};
enableRedistributableFirmware = lib.mkDefault true;
};
services = {
thermald.enable = lib.mkDefault true;
};
}
+9
View File
@@ -0,0 +1,9 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/intel/tiger-lake
../../../common/pc/laptop
../../../common/pc/laptop/ssd
];
}
File renamed without changes.
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
];
}
+3
View File
@@ -27,4 +27,7 @@
# enable cooling management, see NixOS/nixos-hardware#127
services.thermald.enable = lib.mkDefault true;
# fix laptop's screen flickering, see https://wiki.archlinux.org/title/Intel_graphics#Screen_flickering
boot.kernelParams = ["i915.enable_psr=0"];
}
+20
View File
@@ -0,0 +1,20 @@
= Dell XPS 15 9530 =
== Tested Hardware ==
* CPU: 13th Gen Intel(R) Core(TM) i9-13900H
* RAM: 32 GB
* HDD: 1 TiB SSD (NVME)
* Screen: 15" 4k (3456 x 2160)
* Graphics: NVIDIA GeForce RTX 4070 Laptop GPU, with Intel Graphics too.
* Input: Touchscreen and trackpad.
== Notes ==
== NVIDIA Offload ==
In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` function, for example:
```
nvidia-offload `nix-shell -p glxinfo --run 'glxgears'`
```
This is a short bash script that sets the proper environment variables and calls your command.
+29
View File
@@ -0,0 +1,29 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
../../../common/pc/laptop/ssd
];
# This will save you money and possibly your life!
services.thermald.enable = lib.mkDefault true;
# 9530 wifi is:
# > lspci | grep i Network
# - 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01)
# > sudo lspci -vv -s 00:14.3
# 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01)
# Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz
#
# WiFi speed is slow and crashes by default (https://bugzilla.kernel.org/show_bug.cgi?id=213381)
# disable_11ax - required until ax driver support is fixed
# power_save - works well on this card
# boot.extraModprobeConfig = ''
# options iwlwifi power_save=1 disable_11ax=1
# '';
boot.extraModprobeConfig = ''
options iwlwifi power_save=1
'';
}
+15
View File
@@ -0,0 +1,15 @@
{ lib, ... }:
{
imports = [
../default.nix
../../../../common/gpu/nvidia/prime.nix
];
hardware.nvidia.prime = {
# Bus ID of the Intel GPU.
intelBusId = lib.mkDefault "PCI:0:2:0";
# Bus ID of the NVIDIA GPU.
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
};
}
+1 -6
View File
@@ -1,11 +1,6 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/intel/kaby-lake
../../../common/pc/laptop
./xps-common.nix
./shared.nix
];
# Includes the Wi-Fi and Bluetooth firmware
hardware.enableRedistributableFirmware = lib.mkDefault true;
}
+3 -3
View File
@@ -1,8 +1,8 @@
{
imports = [
../../../../common/cpu/intel
../../../../common/pc/laptop
../../../../common/gpu/nvidia/disable.nix
../xps-common.nix
../shared.nix
];
# Disables the Nvidia GPU, better for battery life
}
+1 -4
View File
@@ -1,12 +1,9 @@
{ ... }:
{
imports = [
../../../../common/cpu/intel
../../../../common/gpu/nvidia/prime.nix
../../../../common/gpu/nvidia/pascal
../../../../common/pc/laptop
../xps-common.nix
../shared.nix
];
+20
View File
@@ -0,0 +1,20 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/intel/coffee-lake
../../../common/pc/laptop
];
# Solution to rcu_sched freezing
boot.kernelParams = [ "acpi_rev_override" ];
# This will save you money and possibly your life!
# https://github.com/NixOS/nixos-hardware/pull/127
services.thermald.enable = lib.mkDefault true;
hardware.graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
}
-10
View File
@@ -1,10 +0,0 @@
{ lib, ... }:
{
# Solution to rcu_sched freezing
boot.kernelParams = [ "acpi_rev_override" ];
boot.kernelModules = [ "kvm-intel" ];
# This will save you money and possibly your life!
services.thermald.enable = lib.mkDefault true;
}
+19 -1
View File
@@ -12,6 +12,7 @@
{
acer-aspire-4810t = import ./acer/aspire/4810t;
airis-n990 = import ./airis/n990;
aoostar-r1-n100 = import ./aoostar/r1/n100;
apple-imac-14-2 = import ./apple/imac/14-2;
apple-imac-18-2 = import ./apple/imac/18-2;
apple-macbook-air-3 = import ./apple/macbook-air/3;
@@ -55,22 +56,28 @@
beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle;
chuwi-minibook-x = import ./chuwi/minibook-x;
deciso-dec = import ./deciso/dec;
dell-e7240 = import ./dell/e7240;
dell-e7240 =
deprecated "1326" "dell-e7240"
(import ./dell/e7240);
dell-g3-3779 = import ./dell/g3/3779;
dell-g3-3579 = import ./dell/g3/3579;
dell-inspiron-14-5420 = import ./dell/inspiron/14-5420;
dell-inspiron-5509 = import ./dell/inspiron/5509;
dell-inspiron-5515 = import ./dell/inspiron/5515;
dell-inspiron-7405 = import ./dell/inspiron/7405;
dell-inspiron-7460 = import ./dell/inspiron/7460;
dell-inspiron-7559 = import ./dell/inspiron/7559;
dell-latitude-3340 = import ./dell/latitude/3340;
dell-latitude-3480 = import ./dell/latitude/3480;
dell-latitude-5490 = import ./dell/latitude/5490;
dell-latitude-5520 = import ./dell/latitude/5520;
dell-latitude-7280 = import ./dell/latitude/7280;
dell-latitude-7390 = import ./dell/latitude/7390;
dell-latitude-7420 = import ./dell/latitude/7420;
dell-latitude-7430 = import ./dell/latitude/7430;
dell-latitude-7490 = import ./dell/latitude/7490;
dell-latitude-9430 = import ./dell/latitude/9430;
dell-latitude-e7240 = import ./dell/latitude/e7240;
dell-optiplex-3050 = import ./dell/optiplex/3050;
dell-poweredge-r7515 = import ./dell/poweredge/r7515;
dell-precision-3541 = import ./dell/precision/3541;
@@ -96,6 +103,8 @@
dell-xps-15-9510-nvidia = import ./dell/xps/15-9510/nvidia;
dell-xps-15-9520 = import ./dell/xps/15-9520;
dell-xps-15-9520-nvidia = import ./dell/xps/15-9520/nvidia;
dell-xps-15-9530 = import ./dell/xps/15-9530;
dell-xps-15-9530-nvidia = import ./dell/xps/15-9530/nvidia;
dell-xps-15-9550 = import ./dell/xps/15-9550;
dell-xps-15-9550-nvidia = import ./dell/xps/15-9550/nvidia;
dell-xps-15-9560 = import ./dell/xps/15-9560;
@@ -118,6 +127,7 @@
friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s;
focus-m2-gen1 = import ./focus/m2/gen1;
gigabyte-b550 = import ./gigabyte/b550;
gigabyte-b650 = import ./gigabyte/b650;
google-pixelbook = import ./google/pixelbook;
gpd-micropc = import ./gpd/micropc;
gpd-p2-max = import ./gpd/p2-max;
@@ -131,6 +141,7 @@
hp-elitebook-845g7 = import ./hp/elitebook/845/g7;
hp-elitebook-845g8 = import ./hp/elitebook/845/g8;
hp-elitebook-845g9 = import ./hp/elitebook/845/g9;
hp-probook-440G5 = import ./hp/probook/440G5;
hp-laptop-14s-dq2024nf = import ./hp/laptop/14s-dq2024nf;
huawei-machc-wa = import ./huawei/machc-wa;
hp-notebook-14-df0023 = import ./hp/notebook/14-df0023;
@@ -178,6 +189,7 @@
lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4;
lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3;
lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1;
lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2;
lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50;
lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51;
lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52;
@@ -204,6 +216,7 @@
lenovo-thinkpad-t480 = import ./lenovo/thinkpad/t480;
lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s;
lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490;
lenovo-thinkpad-t490s = import ./lenovo/thinkpad/t490s;
lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495;
lenovo-thinkpad-t520 = import ./lenovo/thinkpad/t520;
lenovo-thinkpad-w520 = import ./lenovo/thinkpad/w520;
@@ -269,6 +282,7 @@
nxp-imx8qm-mek = import ./nxp/imx8qm-mek;
hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4;
hardkernel-odroid-h3 = import ./hardkernel/odroid-h3;
hardkernel-odroid-h4 = import ./hardkernel/odroid-h4;
omen-14-fb0798ng = import ./omen/14-fb0798ng;
omen-15-ce002ns = import ./omen/15-ce002ns;
omen-15-en0010ca = import ./omen/15-en0010ca;
@@ -290,6 +304,10 @@
raspberry-pi-3 = import ./raspberry-pi/3;
raspberry-pi-4 = import ./raspberry-pi/4;
raspberry-pi-5 = import ./raspberry-pi/5;
rock-4c-plus = import ./radxa/rock-4c-plus;
rock-5b = import ./radxa/rock-5b;
rock-pi-4 = import ./radxa/rock-pi-4;
rock-pi-e = import ./radxa/rock-pi-e;
kobol-helios4 = import ./kobol/helios4;
samsung-np900x3c = import ./samsung/np900x3c;
slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx;
@@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
@@ -9,4 +9,29 @@
# Need at least 6.9 to make suspend properly
# Specifically this patch: https://github.com/torvalds/linux/commit/073237281a508ac80ec025872ad7de50cfb5a28a
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.9") (lib.mkDefault pkgs.linuxPackages_latest);
# Intel NPU Driver
# https://discourse.nixos.org/t/new-installation-on-asus-zenbook-ux5406-intel-vpu-firmware-error-2/58732/2
hardware.firmware = lib.optionals (config.hardware.enableRedistributableFirmware) [
(
let
model = "37xx";
version = "0.0";
firmware = pkgs.fetchurl {
url = "https://github.com/intel/linux-npu-driver/raw/v1.13.0/firmware/bin/vpu_${model}_v${version}.bin";
hash = "sha256-Mpoeq8HrwChjtHALsss/7QsFtDYAoFNsnhllU0xp3os=";
};
in
pkgs.runCommand "intel-vpu-firmware-${model}-${version}" { } ''
mkdir -p "$out/lib/firmware/intel/vpu"
cp '${firmware}' "$out/lib/firmware/intel/vpu/vpu_${model}_v${version}.bin"
''
)
];
warnings = lib.mkIf (!config.hardware.enableRedistributableFirmware) [
''For Intel NPU support, set the option: hardware.enableRedistributableFirmware = true;''
];
}
+1
View File
@@ -9,6 +9,7 @@ in {
default = lib.and
(lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05")
kernel_version_compatible;
defaultText = "enabled by default on NixOS >= 24.05 and kernel >= 6.10";
};
-5
View File
@@ -6,8 +6,3 @@ bug where the PC will wakeup immediately after going into suspend.
## Affects at least
- Gigabyte B650M Aorus Elite AX (Rev. 1.3) (BIOS Version F32b)
- Can not be fixed by modifying enabled entries in /proc/acpi/wakeup.
Computer wakes up even if all enabled entries are disabled. Therefore, no
fix exist currently.
+6
View File
@@ -0,0 +1,6 @@
{
# see https://bbs.archlinux.org/viewtopic.php?pid=2227023
boot.kernelParams = [
"acpi_osi=\"!Windows 2015\""
];
}
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
./b650-fix-suspend.nix
];
}
+10 -5
View File
@@ -1,5 +1,5 @@
{ lib, pkgs, ... }:
let inherit (lib) mkDefault;
let inherit (lib) mkIf mkDefault;
in
{
imports = [
@@ -11,10 +11,15 @@ in
../../common/hidpi.nix
];
boot.kernelParams = [
# The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise
"fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up"
];
boot = {
# As of kernel version 6.6.72, amdgpu throws a fatal error during init, resulting in a barely-working display
kernelPackages = mkIf (lib.versionOlder pkgs.linux.version "6.12") pkgs.linuxPackages_latest;
kernelParams = [
# The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise
"fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up"
];
};
fonts.fontconfig = {
subpixel.rgba = "vbgr"; # Pixel order for rotated screen
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
../../common/cpu/intel/alder-lake
];
}
+16
View File
@@ -0,0 +1,16 @@
{ config, lib, ... }:
{
# https://www.intel.com/content/www/us/en/products/sku/124967/intel-core-i58250u-processor-6m-cache-up-to-3-40-ghz/specifications.html
# this one works: https://nixos.wiki/wiki/Accelerated_Video_Playback
imports = [
../../../common/cpu/intel/kaby-lake
../../../common/pc
../../../common/pc/laptop
../../../common/pc/laptop/ssd
];
config = {
services.thermald.enable = lib.mkDefault true;
};
}
+6
View File
@@ -9,6 +9,12 @@ When using more than one drive, the value of `hardware.nvidia.prime.amdgpuBusId`
Make sure you override this default in your personal configuration. For two drives, it should be `PCI:6:0:0`.
## Using and troubleshooting power profiles (hybrid-only)
Power profile support (cycled via Fn + Q) is provided by `nvidia-powerd`.
Should you encounter issues with the `nvidia-powerd` daemon,
override the value of `hardware.nvidia.dynamicBoost.enable` to `false` in your personal configuration (and consider creating an issue if one does not exist).
## Setup at the time of testing
```
$ nix-info -m
+1
View File
@@ -28,6 +28,7 @@
nvidia = {
modesetting.enable = lib.mkDefault true;
powerManagement.enable = lib.mkDefault true;
dynamicBoost.enable = lib.mkDefault true;
prime = {
amdgpuBusId = lib.mkDefault "PCI:5:0:0";
+7
View File
@@ -0,0 +1,7 @@
{
imports = [
../.
../../../../common/cpu/amd
../../../../common/gpu/amd
];
}
@@ -0,0 +1,5 @@
{
imports = [
../.
];
}
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
../.
../../../common/pc/laptop/ssd
];
}
+9
View File
@@ -0,0 +1,9 @@
{lib, ...}: {
imports = [
../../../common/cpu/intel
../../../common/pc/ssd
../.
];
services.throttled.enable = lib.mkDefault true;
}
@@ -7,14 +7,14 @@ let
cfg = config.microsoft-surface;
version = "6.12.9";
version = "6.12.17";
kernelPatches = surfacePatches {
inherit version;
patchFn = ./patches.nix;
};
kernelPackages = linuxPackage {
inherit version kernelPatches;
sha256 = "sha256-h74DYN8JMbNA0rrDUWGlSAcPvDqMNSxJ4h6WZmwmrrQ=";
sha256 = "sha256-XCBc00+Al05Jc+MhywCPX2iVqKqMJXfwapRIzXfeY7M=";
ignoreConfigErrors=true;
};
+48 -40
View File
@@ -1,49 +1,57 @@
{ pkgs, ... } @ args:
{ pkgs, ... }@args:
with pkgs;
buildLinux (args // rec {
version = "5.15.71";
buildLinux (
args
// rec {
version = "5.15.71";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = version;
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = version;
defconfig = "imx_v8_defconfig";
defconfig = "imx_v8_defconfig";
kernelPatches = [
];
# https://github.com/NixOS/nixpkgs/pull/366004
# introduced a breaking change that if a module is declared but it is not being used it will fail.
ignoreConfigErrors = true;
autoModules = false;
kernelPatches = [
];
extraConfig = ''
CRYPTO_TLS m
TLS y
MD_RAID0 m
MD_RAID1 m
MD_RAID10 m
MD_RAID456 m
DM_VERITY m
LOGO y
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER n
FB_EFI n
EFI_STUB y
EFI y
VIRTIO y
VIRTIO_PCI y
VIRTIO_BLK y
DRM_VIRTIO_GPU y
EXT4_FS y
USBIP_CORE m
USBIP_VHCI_HCD m
USBIP_HOST m
USBIP_VUDC m
'';
autoModules = false;
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "linux-imx";
# tag: refs/tags/lf-5.15.71-2.2.0
rev = "3313732e9984cb8a6b10a9085c7e18d58e770d56";
sha256 = "sha256-PBRiSgjPOq4keiwPOfNOswf1Zzdbn6YOjpOgv4/Oscc=";
};
} // (args.argsOverride or { }))
extraConfig = ''
CRYPTO_TLS m
TLS y
MD_RAID0 m
MD_RAID1 m
MD_RAID10 m
MD_RAID456 m
DM_VERITY m
LOGO y
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER n
FB_EFI n
EFI_STUB y
EFI y
VIRTIO y
VIRTIO_PCI y
VIRTIO_BLK y
DRM_VIRTIO_GPU y
EXT4_FS y
USBIP_CORE m
USBIP_VHCI_HCD m
USBIP_HOST m
USBIP_VUDC m
'';
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "linux-imx";
# tag: refs/tags/lf-5.15.71-2.2.0
rev = "3313732e9984cb8a6b10a9085c7e18d58e770d56";
sha256 = "sha256-PBRiSgjPOq4keiwPOfNOswf1Zzdbn6YOjpOgv4/Oscc=";
};
}
// (args.argsOverride or { })
)
+49 -43
View File
@@ -1,50 +1,56 @@
{pkgs, ...} @ args:
{ pkgs, ... }@args:
with pkgs;
buildLinux (args
// rec {
version = "6.1.55";
name = "imx8mp-linux";
buildLinux (
args
// rec {
version = "6.1.55";
name = "imx8mp-linux";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = version;
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = version;
defconfig = "imx_v8_defconfig";
defconfig = "imx_v8_defconfig";
kernelPatches = [
];
# https://github.com/NixOS/nixpkgs/pull/366004
# introduced a breaking change that if a module is declared but it is not being used it will faill.
ignoreConfigErrors = true;
autoModules = false;
kernelPatches = [
];
extraConfig = ''
CRYPTO_TLS m
TLS y
MD_RAID0 m
MD_RAID1 m
MD_RAID10 m
MD_RAID456 m
DM_VERITY m
LOGO y
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER n
FB_EFI n
EFI_STUB y
EFI y
VIRTIO y
VIRTIO_PCI y
VIRTIO_BLK y
DRM_VIRTIO_GPU y
EXT4_FS y
USBIP_CORE m
USBIP_VHCI_HCD m
USBIP_HOST m
USBIP_VUDC m
'';
autoModules = false;
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "linux-imx";
# tag: lf-6.1.55-2.2.0
rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e";
sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0=";
};
}
// (args.argsOverride or {}))
extraConfig = ''
CRYPTO_TLS m
TLS y
MD_RAID0 m
MD_RAID1 m
MD_RAID10 m
MD_RAID456 m
DM_VERITY m
LOGO y
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER n
FB_EFI n
EFI_STUB y
EFI y
VIRTIO y
VIRTIO_PCI y
VIRTIO_BLK y
DRM_VIRTIO_GPU y
EXT4_FS y
USBIP_CORE m
USBIP_VHCI_HCD m
USBIP_HOST m
USBIP_VUDC m
'';
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "linux-imx";
# tag: lf-6.1.55-2.2.0
rev = "770c5fe2c1d1529fae21b7043911cd50c6cf087e";
sha256 = "sha256-tIWt75RUrjB6KmUuAYBVyAC1dmVGSUAgqV5ROJh3xU0=";
};
}
// (args.argsOverride or { })
)
+4
View File
@@ -10,6 +10,10 @@ with pkgs;
defconfig = "imx_v8_defconfig";
# https://github.com/NixOS/nixpkgs/pull/366004
# introduced a breaking change that if a module is declared but it is not being used it will faill.
ignoreConfigErrors = true;
kernelPatches = [
];
@@ -0,0 +1,27 @@
--- orig.patch 2025-01-23 19:34:37.216154507 +0100
+++ updated-6.12.patch 2025-01-23 19:36:28.316333973 +0100
@@ -11,10 +11,10 @@
#define MT_QUIRK_NOT_SEEN_MEANS_UP BIT(0)
#define MT_QUIRK_SLOT_IS_CONTACTID BIT(1)
@@ -70,6 +73,7 @@
- #define MT_QUIRK_WIN8_PTP_BUTTONS BIT(18)
- #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19)
#define MT_QUIRK_FORCE_MULTI_INPUT BIT(20)
-+#define MT_QUIRK_NON_MT_PEN BIT(21)
+ #define MT_QUIRK_DISABLE_WAKEUP BIT(21)
+ #define MT_QUIRK_ORIENTATION_INVERT BIT(22)
++#define MT_QUIRK_NON_MT_PEN BIT(23)
#define MT_INPUTMODE_TOUCHSCREEN 0x02
#define MT_INPUTMODE_TOUCHPAD 0x03
@@ -41,9 +41,9 @@
#define MT_CLS_RAZER_BLADE_STEALTH 0x0112
#define MT_CLS_SMART_TECH 0x0113
+#define MT_CLS_NON_MT_PEN 0x0114
+ #define MT_CLS_SIS 0x0457
#define MT_DEFAULT_MAXCONTACT 10
- #define MT_MAX_MAXCONTACT 250
@@ -374,6 +383,9 @@
MT_QUIRK_CONTACT_CNT_ACCURATE |
MT_QUIRK_SEPARATE_APP_REPORT,
@@ -18,8 +18,16 @@ let
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./6.1.patch.patch}
'';
patch1_updated_6_12 = runCommand
"goodix-stylus-mastykin-1-pen-support-6.12.patch" {}
''
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./6.12.patch.patch}
'';
patch1 =
if (lib.versionAtLeast kernel.version "6.1") then
if (lib.versionAtLeast kernel.version "6.12") then
patch1_updated_6_12
else if (lib.versionAtLeast kernel.version "6.1") then
patch1_updated_6_1
else if (lib.versionAtLeast kernel.version "5.12.12") then
patch1_updated_5_12_12
+40 -17
View File
@@ -1,18 +1,41 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.hardware.librem5.audio {
assertions = [{
assertion = config.hardware.pulseaudio.enable;
message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`.";
}];
hardware.pulseaudio = {
enable = true;
# this is required to correctly configure the modem as PA source/sink
extraConfig = ''
.include ${config.hardware.librem5.package}/etc/pulse/librem5.pa
'';
};
services.dbus.packages = [ pkgs.callaudiod ];
};
{ config
, lib
, pkgs
, ...
}: {
config =
lib.mkIf config.hardware.librem5.audio
{
services.dbus.packages = [ pkgs.callaudiod ];
}
// (
let
paConfig = {
enable = true;
# this is required to correctly configure the modem as PA source/sink
extraConfig = ''
.include ${config.hardware.librem5.package}/etc/pulse/librem5.pa
'';
};
in
if lib.versionOlder (lib.versions.majorMinor lib.version) "25.05"
then {
assertions = [
{
assertion = config.hardware.pulseaudio.enable;
message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`.";
}
];
hardware.pulseaudio = paConfig;
}
else {
assertions = [
{
assertion = config.services.pulseaudio.enable;
message = "Call audio on Librem5 requires pulse audio to be enabled through `services.pulseaudio.enable`.";
}
];
services.pulseaudio = paConfig;
}
);
}
+6 -3
View File
@@ -6,16 +6,19 @@
buildLinux (args
// rec {
defconfig = "librem5_defconfig";
version = "6.6.29-librem5";
version = "6.6.74-librem5";
modDirVersion = version;
src = fetchFromGitLab {
domain = "source.puri.sm";
owner = "Librem5";
repo = "linux";
rev = "pureos/6.6.29pureos1";
hash = "sha256-i8HSAJ1/Z2Ux2s3Srse+L0S1Zd/70ldpGBhIgEZ6nBw=";
rev = "pureos/6.6.74pureos1";
hash = "sha256-qUPY+2fHVu7SFc+Uf8U7QtkQJJsE/4I1SavpLqJ/34c=";
};
kernelPatches = [ ];
# see https://github.com/NixOS/nixpkgs/pull/366004
ignoreConfigErrors = true;
structuredExtraConfig = with lib.kernel; {
# buildLinux overrides this and defaults to 32, so go back to the value defined librem5_defconfig
# this is required for millipixels to take photos, otherwise the VIDIOC_REQ_BUFS ioctl returns ENOMEM
+112
View File
@@ -0,0 +1,112 @@
# NixOS support for Radxa devices
Radxa provides the NixOS implementation in the form of `nixos-hardware` modules
for advanced users.
Our goals are:
* Only use `nixpkgs` provided packages.
* Provide a consistent and simple experience to use our NixOS module.
* Targetted audiences are advanced users who care mostly about CPU compute, storage, and network.
* No support guarantee. We are not here to teach people how to use NixOS.
We explicitly want to avoid packaging the entire vendor SDK bootloader and kernel
in Nix. Those are not going to be accepted in `nixpkgs`, and our targetted audiences
like homelabbers generally ignore the additional hardware features.
This also aligns with [NixOS on ARM](https://wiki.nixos.org/wiki/NixOS_on_ARM)'s
definition of "support":
> Support for those board assumes as much is supported as Mainline Linux supports.
## Characteristic of the default profiles
* Using `linuxPackages_latest`
* `bcachefs` rootfs with zstd compression and password-less encryption enabled
* EFI boot chain provided by `systemd-boot`
* Default serial console enabled with baud rate matches the platform firmware
* No automatic partition expansion, as the module is only focusing on hardware
## Common Nix flake pattern
Below is an annoated flake example to create the initial boot image.
```
{
description = "Example NixOS configurations for Radxa product";
# To build, run `nix build .#nixosConfigurations.radxa.config.system.build.diskoImages`
inputs = {
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unfree.url = "github:numtide/nixpkgs-unfree/nixos-unstable";
};
outputs = inputs@{
self,
disko,
nixos-hardware,
nixpkgs,
nixpkgs-unfree,
}: {
nixosConfigurations = {
radxa = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "aarch64-linux";
modules = [
nixos-hardware.nixosModules.rock-4c-plus # Update the system according to your device.
# Or, if the default platform firmware is not available in the NixOS version you are using:
# (import nixos-hardware.nixosModules.rock-pi-e {
# lib = nixpkgs-unfree.lib;
# config = nixpkgs-unfree.config;
# pkgs = nixpkgs-unfree.legacyPackages.aarch64-linux;
# })
disko.nixosModules.disko # disko usage is optional in the running system, but we need it to generate the initial boot image.
"${nixos-hardware}/radxa/disko.nix" # Common Radxa Disko profile. It is system-agnostic.
{
disko = {
imageBuilder = {
# Avoid double emulation to significantly speed up image building process.
# Update the system according to your host system.
# See https://github.com/nix-community/disko/issues/856
qemu = nixpkgs.legacyPackages.x86_64-linux.qemu + "/bin/qemu-system-aarch64 -M virt -cpu cortex-a57";
};
# Default image size is 2G for a small basic CLI system.
# devices.disk.main.imageSize = "2G";
};
# Override the default bootloader with a cross built one.
# Use this if you do not have binfmt configured on your system.
# For NixOS, please add `boot.binfmt.emulatedSystems = [ "aarch64-linux" ];` to your system configuration.
# Read the device module to see how it was configured.
# hardware.rockchip.platformFirmware = nixpkgs-unfree.legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform.ubootRock4CPlus;
users.users.radxa = {
isNormalUser = true;
initialPassword = "radxa";
extraGroups = [ "wheel" ];
};
services.openssh.enable = true;
networking.hostName = "radxa";
system.stateVersion = "24.11";
}
];
};
};
};
}
```
For most of the supported products, you only need to change the device module (
i.e. `nixos-hardware.nixosModules.rock-4c-plus`) to match the one you are using.
## Known issues
* Currently, the `hardware.radxa` module and Radxa-maintained SoC vendor modules
(eg. `hardware.rockchip`) are tightly coupled and not intended for end-user to
use. Those options are currently used internally for hardware enablement, and
end-user should not need to modify them. Consider those interfaces **unstable**.
+23
View File
@@ -0,0 +1,23 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.radxa;
in {
options.hardware.radxa = {
enable = lib.mkEnableOption "Radxa system support";
};
config = lib.mkIf cfg.enable {
boot = {
# Currently enable bcachefs automatically set
# kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
# TODO: Consider removing this line once, we get an LTS kernel that is newer than 6.12
kernelPackages = lib.mkOverride 990 pkgs.linuxPackages_latest;
supportedFilesystems = [ "bcachefs" ];
loader.systemd-boot.enable = lib.mkDefault true;
};
};
}
+12
View File
@@ -0,0 +1,12 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.radxa;
in {
imports = [
../rockchip/disko.nix
];
}
+20
View File
@@ -0,0 +1,20 @@
{ lib
, pkgs
, config
, ...
}: {
imports = [
../.
../../rockchip
];
config = {
hardware = {
radxa.enable = true;
rockchip = {
rk3399.enable = true;
platformFirmware = lib.mkDefault pkgs.ubootRock4CPlus;
};
};
};
}
+20
View File
@@ -0,0 +1,20 @@
{ lib
, pkgs
, config
, ...
}: {
imports = [
../.
../../rockchip
];
config = {
hardware = {
radxa.enable = true;
rockchip = {
rk3588.enable = true;
platformFirmware = lib.mkDefault pkgs.ubootRock5ModelB;
};
};
};
}
+20
View File
@@ -0,0 +1,20 @@
{ lib
, pkgs
, config
, ...
}: {
imports = [
../.
../../rockchip
];
config = {
hardware = {
radxa.enable = true;
rockchip = {
rk3399.enable = true;
platformFirmware = lib.mkDefault pkgs.ubootRockPi4;
};
};
};
}
+20
View File
@@ -0,0 +1,20 @@
{ lib
, pkgs
, config
, ...
}: {
imports = [
../.
../../rockchip
];
config = {
hardware = {
radxa.enable = true;
rockchip = {
rk3328.enable = true;
platformFirmware = lib.mkDefault pkgs.ubootRockPiE;
};
};
};
}
+2 -2
View File
@@ -18,7 +18,7 @@ in {
hardware.deviceTree = {
overlays = [
# Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
# Equivalent to: https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
{
name = "rpi-poe-overlay";
dtsText = ''
@@ -38,7 +38,7 @@ in {
compatible = "pwm-fan";
cooling-levels = <0 1 10 100 255>;
#cooling-cells = <2>;
pwms = <&fwpwm 0 80000>;
pwms = <&fwpwm 0 80000 0>;
};
};
};
+3 -3
View File
@@ -19,8 +19,8 @@ in {
hardware.deviceTree = {
overlays = [
# Combined equivalent to:
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts
# * https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
# * https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/rpi-poe-plus-overlay.dts
{
name = "rpi-poe-plus-overlay";
dtsText = ''
@@ -40,7 +40,7 @@ in {
compatible = "pwm-fan";
cooling-levels = <0 1 10 100 255>;
#cooling-cells = <2>;
pwms = <&fwpwm 0 80000>;
pwms = <&fwpwm 0 80000 0>;
};
};
};
+53
View File
@@ -0,0 +1,53 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.rockchip;
in {
imports = [
./rk3328
./rk3399
./rk3588
];
options.hardware.rockchip = {
enable = lib.mkEnableOption "Rockchip SoC support";
diskoImageName = lib.mkOption {
type = lib.types.str;
default = "main.raw";
description = ''
The output image name of Disko.
You need to match this value with the real image name. Setting it alone
won't change the output image name, as it is controlled by Disko module.
Can be used in diskoExtraPostVM.
'';
};
platformFirmware = lib.mkPackageOption pkgs "platform firmware" {
default = null;
};
diskoExtraPostVM = lib.mkOption {
type = lib.types.str;
default = ''
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/idbloader.img of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=64
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/u-boot.itb of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=16384
'';
defaultText = lib.literalExpression ''
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/idbloader.img of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=64
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/u-boot.itb of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=16384
'';
description = ''
The post VM hook for Disko's Image Builder.
Can be used to install platform firmware like U-Boot.
'';
};
};
config = lib.mkIf cfg.enable {
boot = {
kernelParams = [ "console=ttyS2,1500000n8" ];
};
};
}
+62
View File
@@ -0,0 +1,62 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.rockchip;
in {
imports = [
rk3399/disko.nix
];
config = lib.mkIf cfg.enable {
disko = {
imageBuilder = {
extraRootModules = [ "bcachefs" ];
extraPostVM = cfg.diskoExtraPostVM;
};
memSize = lib.mkDefault 4096; # Default 1024 MB will throw "Cannot allocate memory" error
devices.disk.main = {
type = "disk";
imageSize = lib.mkDefault "2G";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
# Firmware backoff
start = "16M";
size = "500M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0022" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "bcachefs";
mountpoint = "/";
extraArgs = [
"--metadata_checksum=xxhash"
"--data_checksum=xxhash"
"--compression=zstd"
"--background_compression=zstd"
"--str_hash=siphash"
"--wide_macs"
"--encrypted"
"--no_passphrase"
"--discard"
];
};
};
};
};
};
};
};
}
+16
View File
@@ -0,0 +1,16 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.rockchip.rk3328;
in {
options.hardware.rockchip.rk3328 = {
enable = lib.mkEnableOption "Rockchip RK3328 support";
};
config = lib.mkIf cfg.enable {
hardware.rockchip.enable = true;
};
}
+16
View File
@@ -0,0 +1,16 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.rockchip.rk3399;
in {
options.hardware.rockchip.rk3399 = {
enable = lib.mkEnableOption "Rockchip RK3399 support";
};
config = lib.mkIf cfg.enable {
hardware.rockchip.enable = true;
};
}
+14
View File
@@ -0,0 +1,14 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.rockchip.rk3399;
in {
config = lib.mkIf cfg.enable {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"arm-trusted-firmware-rk3399"
];
};
}
+16
View File
@@ -0,0 +1,16 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.rockchip.rk3588;
in {
options.hardware.rockchip.rk3588 = {
enable = lib.mkEnableOption "Rockchip RK3588 support";
};
config = lib.mkIf cfg.enable {
hardware.rockchip.enable = true;
};
}