diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 37e2af7..782cde3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v23 + - uses: cachix/install-nix-action@v24 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version diff --git a/README.md b/README.md index 70ba060..b8e45bb 100644 --- a/README.md +++ b/README.md @@ -69,194 +69,202 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md). See code for all available configurations. -| Model | Path | -| ------------------------------------------------------------------- | -------------------------------------------------- | -| [Acer Aspire 4810T](acer/aspire/4810t) | `` | -| [Airis N990](airis/n990) | `` | -| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | -| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | -| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | -| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | -| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | -| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | -| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | -| [Apple Macs with a T2 Chip](apple/t2) | `` | -| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | -| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | -| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | -| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | -| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | -| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | -| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | -| [Asus TUF FX504GD](asus/fx504gd) | `` | -| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | -| [Deciso DEC series](deciso/dec) | `` | -| [Dell G3 3779](dell/g3/3779) | `` | -| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | -| [Dell Inspiron 5509](dell/inspiron/5509) | `` | -| [Dell Inspiron 5515](dell/inspiron/5515) | `` | -| [Dell Inspiron 7405](dell/inspiron/7405) | `` | -| [Dell Latitude 3340](dell/latitude/3340) | `` | -| [Dell Latitude 3480](dell/latitude/3480) | `` | -| [Dell Latitude 5520](dell/latitude/5520) | `` | -| [Dell Latitude 7430](dell/latitude/7430) | `` | -| [Dell Latitude 7490](dell/latitude/7490) | `` | -| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | -| [Dell Precision 3541](dell/precision/3541) | `` | -| [Dell Precision 5530](dell/precision/5530) | `` | -| [Dell XPS 13 7390](dell/xps/13-7390) | `` | -| [Dell XPS 13 9300](dell/xps/13-9300) | `` | -| [Dell XPS 13 9310](dell/xps/13-9310) | `` | -| [Dell XPS 13 9333](dell/xps/13-9333) | `` | -| [Dell XPS 13 9343](dell/xps/13-9343) | `` | -| [Dell XPS 13 9350](dell/xps/13-9350) | `` | -| [Dell XPS 13 9360](dell/xps/13-9360) | `` | -| [Dell XPS 13 9370](dell/xps/13-9370) | `` | -| [Dell XPS 13 9380](dell/xps/13-9380) | `` | -| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | -| [Dell XPS 15 7590](dell/xps/15-7590) | `` | -| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | -| [Dell XPS 15 9500](dell/xps/15-9500) | `` | -| [Dell XPS 15 9510, nvidia](dell/xps/15-9510/nvidia) | `` | -| [Dell XPS 15 9510](dell/xps/15-9510) | `` | -| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | -| [Dell XPS 15 9520](dell/xps/15-9520) | `` | -| [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | -| [Dell XPS 15 9550](dell/xps/15-9550) | `` | -| [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | -| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | -| [Dell XPS 15 9560](dell/xps/15-9560) | `` | -| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | -| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | -| [Dell XPS E7240](dell/e7240) | `` | -| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | ``| -| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | ``| -| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | ``| -| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | -| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | -| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | -| [Focus M2 Gen 1](focus/m2/gen1) | `` | -| [GPD MicroPC](gpd/micropc) | `` | -| [GPD P2 Max](gpd/p2-max) | `` | -| [GPD Pocket 3](gpd/pocket-3) | `` | -| [GPD WIN 2](gpd/win-2) | `` | -| [Google Pixelbook](google/pixelbook) | `` | -| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | -| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | -| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | -| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | -| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | -| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | -| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | -| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | -| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | -| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | -| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | -| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | -| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid)| `` | -| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia)| `` | -| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | -| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | -| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | -| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | -| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | -| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | -| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | -| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | -| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | -| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | -| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | -| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | -| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | -| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | -| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | -| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | -| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | -| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | -| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | -| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | -| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | -| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | -| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | -| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | -| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | -| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | -| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | -| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | -| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | -| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | -| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | -| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | -| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | -| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | -| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | -| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | -| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | -| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | -| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | -| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | -| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | -| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | -| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | -| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | -| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | -| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | -| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | -| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | -| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | -| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | -| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | -| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | -| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | -| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | -| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | -| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | -| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | -| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | -| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | -| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | -| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | -| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | -| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | -| [MSI GS60 2QE](msi/gs60) | `` | -| [MSI GL62/CX62](msi/gl62) | `` | -| [Microchip Icicle Kit](microchip/icicle-kit) | `` | -| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | -| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel)| ``| -| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| -| [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | -| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | -| [Morefine M600](morefine/m600) | `` | -| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | -| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | -| [Omen 15-en0010ca](omen/15-en0010ca) | `` | -| [Omen 16-n0005ne](omen/16-n0005ne) | `` | -| [Omen 15-en1007sa](omen/15-en1007sa) | `` | -| [Omen en00015p](omen/en00015p) | `` | -| [One-Netbook OneNetbook 4](onenetbook/4) | `` | -| [Panasonic Let's Note CF-LX4 ](panasonic/letsnote/cf-lx4) | `` | -| [PC Engines APU](pcengines/apu) | `` | -| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | -| [PINE64 RockPro64](pine64/rockpro64/) | `` | -| [PINE64 STAR64](pine64/star64/) | `` | -| [Purism Librem 13v3](purism/librem/13v3) | `` | -| [Purism Librem 15v3](purism/librem/13v3) | `` | -| [Purism Librem 5r4](purism/librem/5r4) | `` | -| [Raspberry Pi 2](raspberry-pi/2) | `` | -| [Raspberry Pi 4](raspberry-pi/4) | `` | -| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | -| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | -| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | -| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | -| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | -| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | -| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | -| [System76 (generic)](system76) | `` | -| [System76 Darter Pro 6](system76/darp6) | `` | -| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | -| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | -| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | +| Model | Path | +| ---------------------------------------------------------------------- | ------------------------------------------------------- | +| [Acer Aspire 4810T](acer/aspire/4810t) | `` | +| [Airis N990](airis/n990) | `` | +| [Apple MacBook Air 3,X](apple/macbook-air/3) | `` | +| [Apple MacBook Air 4,X](apple/macbook-air/4) | `` | +| [Apple MacBook Air 6,X](apple/macbook-air/6) | `` | +| [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | +| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `` | +| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | +| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `` | +| [Apple Macs with a T2 Chip](apple/t2) | `` | +| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | +| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | +| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | +| [Asus ROG Zephyrus G15 GA502](asus/zephyrus/ga502) | `` | +| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `` | +| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `` | +| [Asus TUF FX504GD](asus/fx504gd) | `` | +| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | +| [Deciso DEC series](deciso/dec) | `` | +| [Dell G3 3779](dell/g3/3779) | `` | +| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `` | +| [Dell Inspiron 5509](dell/inspiron/5509) | `` | +| [Dell Inspiron 5515](dell/inspiron/5515) | `` | +| [Dell Inspiron 7405](dell/inspiron/7405) | `` | +| [Dell Latitude 3340](dell/latitude/3340) | `` | +| [Dell Latitude 3480](dell/latitude/3480) | `` | +| [Dell Latitude 5520](dell/latitude/5520) | `` | +| [Dell Latitude 7390](dell/latitude/7390) | `` | +| [Dell Latitude 7430](dell/latitude/7430) | `` | +| [Dell Latitude 7490](dell/latitude/7490) | `` | +| [Dell Poweredge R7515](dell/poweredge/r7515) | `` | +| [Dell Precision 3541](dell/precision/3541) | `` | +| [Dell Precision 5530](dell/precision/5530) | `` | +| [Dell XPS 13 7390](dell/xps/13-7390) | `` | +| [Dell XPS 13 9300](dell/xps/13-9300) | `` | +| [Dell XPS 13 9310](dell/xps/13-9310) | `` | +| [Dell XPS 13 9333](dell/xps/13-9333) | `` | +| [Dell XPS 13 9343](dell/xps/13-9343) | `` | +| [Dell XPS 13 9350](dell/xps/13-9350) | `` | +| [Dell XPS 13 9360](dell/xps/13-9360) | `` | +| [Dell XPS 13 9370](dell/xps/13-9370) | `` | +| [Dell XPS 13 9380](dell/xps/13-9380) | `` | +| [Dell XPS 15 7590, nvidia](dell/xps/15-7590/nvidia) | `` | +| [Dell XPS 15 7590](dell/xps/15-7590) | `` | +| [Dell XPS 15 9500, nvidia](dell/xps/15-9500/nvidia) | `` | +| [Dell XPS 15 9500](dell/xps/15-9500) | `` | +| [Dell XPS 15 9510, nvidia](dell/xps/15-9510/nvidia) | `` | +| [Dell XPS 15 9510](dell/xps/15-9510) | `` | +| [Dell XPS 15 9520, nvidia](dell/xps/15-9520/nvidia) | `` | +| [Dell XPS 15 9520](dell/xps/15-9520) | `` | +| [Dell XPS 15 9550, nvidia](dell/xps/15-9550/nvidia) | `` | +| [Dell XPS 15 9550](dell/xps/15-9550) | `` | +| [Dell XPS 15 9560, intel only](dell/xps/15-9560/intel) | `` | +| [Dell XPS 15 9560, nvidia only](dell/xps/15-9560/nvidia) | `` | +| [Dell XPS 15 9560](dell/xps/15-9560) | `` | +| [Dell XPS 17 9700, intel](dell/xps/17-9700/intel) | `` | +| [Dell XPS 17 9710, intel only](dell/xps/17-9710/intel) | `` | +| [Dell XPS E7240](dell/e7240) | `` | +| [Framework 11th Gen Intel Core](framework/13-inch/11th-gen-intel) | `` | +| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `` | +| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `` | +| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `` | +| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `` | +| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `` | +| [Focus M2 Gen 1](focus/m2/gen1) | `` | +| [GPD MicroPC](gpd/micropc) | `` | +| [GPD P2 Max](gpd/p2-max) | `` | +| [GPD Pocket 3](gpd/pocket-3) | `` | +| [GPD WIN 2](gpd/win-2) | `` | +| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | +| [Google Pixelbook](google/pixelbook) | `` | +| [HP Elitebook 2560p](hp/elitebook/2560p) | `` | +| [HP Elitebook 845g7](hp/elitebook/845/g7) | `` | +| [HP Elitebook 845g8](hp/elitebook/845/g8) | `` | +| [HP Elitebook 845g9](hp/elitebook/845/g9) | `` | +| [HP Notebook 14-df0023](hp/notebook/14-df0023) | `` | +| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `` | +| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | +| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | +| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | +| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | +| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `` | +| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `` | +| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `` | +| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | +| [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid) | `` | +| [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia) | `` | +| [Lenovo Legion 7 16achg6 (Hybrid)](lenovo/legion/16achg6/hybrid) | `` | +| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `` | +| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | +| [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | +| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | +| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | +| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `` | +| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `` | +| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `` | +| [Lenovo ThinkPad L13](lenovo/thinkpad/l13) | `` | +| [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | +| [Lenovo ThinkPad L14 (Intel)](lenovo/thinkpad/l14/intel) | `` | +| [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | +| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | +| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `` | +| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `` | +| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `` | +| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `` | +| [Lenovo ThinkPad P52](lenovo/thinkpad/p52) | `` | +| [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | +| [Lenovo ThinkPad T14 AMD Gen 3](lenovo/thinkpad/t14/amd/gen3) | `` | +| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | +| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | +| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | +| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | +| [Lenovo ThinkPad T430](lenovo/thinkpad/t430) | `` | +| [Lenovo ThinkPad T440p](lenovo/thinkpad/t440p) | `` | +| [Lenovo ThinkPad T440s](lenovo/thinkpad/t440s) | `` | +| [Lenovo ThinkPad T450s](lenovo/thinkpad/t450s) | `` | +| [Lenovo ThinkPad T460](lenovo/thinkpad/t460) | `` | +| [Lenovo ThinkPad T460p](lenovo/thinkpad/t460p) | `` | +| [Lenovo ThinkPad T460s](lenovo/thinkpad/t460s) | `` | +| [Lenovo ThinkPad T470s](lenovo/thinkpad/t470s) | `` | +| [Lenovo ThinkPad T480](lenovo/thinkpad/t480) | `` | +| [Lenovo ThinkPad T480s](lenovo/thinkpad/t480s) | `` | +| [Lenovo ThinkPad T490](lenovo/thinkpad/t490) | `` | +| [Lenovo ThinkPad T495](lenovo/thinkpad/t495) | `` | +| [Lenovo ThinkPad T520](lenovo/thinkpad/t520) | `` | +| [Lenovo ThinkPad T550](lenovo/thinkpad/t550) | `` | +| [Lenovo ThinkPad T590](lenovo/thinkpad/t590) | `` | +| [Lenovo ThinkPad X1 Yoga](lenovo/thinkpad/x1/yoga) | `` | +| [Lenovo ThinkPad X1 Yoga Gen 7](lenovo/thinkpad/x1/yoga/7th-gen/) | `` | +| [Lenovo ThinkPad X1 (6th Gen)](lenovo/thinkpad/x1/6th-gen) | `` | +| [Lenovo ThinkPad X1 (7th Gen)](lenovo/thinkpad/x1/7th-gen) | `` | +| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | +| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | +| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | +| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | +| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | +| [Lenovo ThinkPad X13 Yoga](lenovo/thinkpad/x13/yoga) | `` | +| [Lenovo ThinkPad X13 Yoga (3th Gen)](lenovo/thinkpad/x13/yoga/3th-gen) | `` | +| [Lenovo ThinkPad X13](lenovo/thinkpad/x13) | `` | +| [Lenovo ThinkPad X140e](lenovo/thinkpad/x140e) | `` | +| [Lenovo ThinkPad X200s](lenovo/thinkpad/x200s) | `` | +| [Lenovo ThinkPad X220](lenovo/thinkpad/x220) | `` | +| [Lenovo ThinkPad X230](lenovo/thinkpad/x230) | `` | +| [Lenovo ThinkPad X250](lenovo/thinkpad/x250) | `` | +| [Lenovo ThinkPad X260](lenovo/thinkpad/x260) | `` | +| [Lenovo ThinkPad X270](lenovo/thinkpad/x270) | `` | +| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `` | +| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `` | +| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `` | +| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `` | +| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `` | +| [MSI GS60 2QE](msi/gs60) | `` | +| [MSI GL62/CX62](msi/gl62) | `` | +| [Microchip Icicle Kit](microchip/icicle-kit) | `` | +| [Microsoft Surface Go](microsoft/surface/surface-go) | `` | +| [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel) | `` | +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `` | +| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `` | +| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | +| [Morefine M600](morefine/m600) | `` | +| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | +| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | +| [Omen 15-en0010ca](omen/15-en0010ca) | `` | +| [Omen 16-n0005ne](omen/16-n0005ne) | `` | +| [Omen 15-en1007sa](omen/15-en1007sa) | `` | +| [Omen en00015p](omen/en00015p) | `` | +| [One-Netbook OneNetbook 4](onenetbook/4) | `` | +| [Panasonic Let's Note CF-LX4](panasonic/letsnote/cf-lx4) | `` | +| [PC Engines APU](pcengines/apu) | `` | +| [PINE64 Pinebook Pro](pine64/pinebook-pro/) | `` | +| [PINE64 RockPro64](pine64/rockpro64/) | `` | +| [PINE64 STAR64](pine64/star64/) | `` | +| [Purism Librem 13v3](purism/librem/13v3) | `` | +| [Purism Librem 15v3](purism/librem/13v3) | `` | +| [Purism Librem 5r4](purism/librem/5r4) | `` | +| [Raspberry Pi 2](raspberry-pi/2) | `` | +| [Raspberry Pi 4](raspberry-pi/4) | `` | +| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `` | +| [StarFive VisionFive v1](starfive/visionfive/v1) | `` | +| [StarFive VisionFive 2](starfive/visionfive/v2) | `` | +| [Supermicro A1SRi-2758F](supermicro/a1sri-2758f) | `` | +| [Supermicro M11SDV-8C-LN4F](supermicro/m11sdv-8c-ln4f) | `` | +| [Supermicro X10SLL-F](supermicro/x10sll-f) | `` | +| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | +| [System76 (generic)](system76) | `` | +| [System76 Darter Pro 6](system76/darp6) | `` | +| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | +| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | +| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `` | +| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `` | diff --git a/apple/macbook-air/6/default.nix b/apple/macbook-air/6/default.nix index c892026..182511f 100644 --- a/apple/macbook-air/6/default.nix +++ b/apple/macbook-air/6/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: { imports = [ ../. ]; diff --git a/apple/t2/default.nix b/apple/t2/default.nix index 359748a..33658d6 100644 --- a/apple/t2/default.nix +++ b/apple/t2/default.nix @@ -8,6 +8,12 @@ let hash = "sha256-x7K0qa++P1e1vuCGxnsFxL1d9+nwMtZUJ6Kd9e27TFs="; }; + 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" ]; @@ -18,7 +24,7 @@ let pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/"; - apple-set-os-loader-installer = pkgs.stdenv.mkDerivation rec { + apple-set-os-loader-installer = pkgs.stdenv.mkDerivation { name = "apple-set-os-loader-installer-1.0"; src = pkgs.fetchFromGitHub { owner = "Redecorating"; @@ -51,15 +57,12 @@ in config = { # For keyboard and touchbar - boot.kernelPackages = with pkgs; recurseIntoAttrs (linuxPackagesFor (callPackage ./pkgs/linux-t2.nix { })); + boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./pkgs/linux-t2.nix { }); boot.initrd.kernelModules = [ "apple-bce" ]; # For audio boot.kernelParams = [ "pcie_ports=compat" "intel_iommu=on" "iommu=pt" ]; - services.udev.extraRules = builtins.readFile (pkgs.substitute { - src = "${audioFiles}/files/91-audio-custom.rules"; - replacements = [ "--replace" "/usr/bin/sed" "${pkgs.gnused}/bin/sed" ]; - }); + services.udev.packages = [ audioFilesUdevRules ]; hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/"; diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index b9f0109..40371fe 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -1,4 +1,5 @@ -{ lib, buildLinux, fetchFromGitHub, fetchurl, ... } @ args: +{ lib, buildLinux, fetchFromGitHub, fetchzip, runCommand +, ... } @ args: let patchRepo = fetchFromGitHub { @@ -18,10 +19,18 @@ buildLinux (args // { # Snippet from nixpkgs modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}"; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-eldLvCCALqdrUsp/rwcmf3IEXoYbGJFcUnKpjCer+IQ="; - }; + src = runCommand "patched-source" {} '' + cp -r ${fetchzip { + url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; + hash = "sha256-qJmVSju69WcvDIbgrbtMyCi+OXUNTzNX2G+/0zwsPR4="; + }} $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; @@ -40,7 +49,5 @@ buildLinux (args // { STAGING = yes; }; - kernelPatches = lib.attrsets.mapAttrsToList (file: type: { name = file; patch = "${patchRepo}/${file}"; }) - (lib.attrsets.filterAttrs (file: type: type == "regular" && lib.strings.hasSuffix ".patch" file) - (builtins.readDir patchRepo)); + kernelPatches = []; } // (args.argsOverride or {})) diff --git a/common/cpu/amd/raphael/igpu.nix b/common/cpu/amd/raphael/igpu.nix index 82514c2..6faffd0 100644 --- a/common/cpu/amd/raphael/igpu.nix +++ b/common/cpu/amd/raphael/igpu.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, ... }: { # Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old @@ -10,7 +10,7 @@ boot = lib.mkMerge [ (lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") { kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["amdgpu.sg_display=0"]; + kernelParams = ["amdgpu.sg_display=0"]; }) (lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.2") { diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index 371e9eb..e54f942 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, ... }: +{ lib, config, ... }: { imports = [ ./. ]; diff --git a/dell/latitude/7390/default.nix b/dell/latitude/7390/default.nix new file mode 100644 index 0000000..6ce667d --- /dev/null +++ b/dell/latitude/7390/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ]; +} diff --git a/dell/precision/3541/intel/default.nix b/dell/precision/3541/intel/default.nix index 78a839d..a650e57 100644 --- a/dell/precision/3541/intel/default.nix +++ b/dell/precision/3541/intel/default.nix @@ -1,5 +1,3 @@ -{ lib, pkgs, ... }: - { imports = [ ../../../../common/cpu/intel diff --git a/dell/xps/13-9310/default.nix b/dell/xps/13-9310/default.nix index 8f8fabb..d5fcdc6 100644 --- a/dell/xps/13-9310/default.nix +++ b/dell/xps/13-9310/default.nix @@ -16,6 +16,12 @@ # Without this we get errors in dmesg on boot and hangs when shutting down. boot.blacklistedKernelModules = [ "psmouse" ]; + # enable finger print sensor. + # this has to be configured with `sudo fprintd-enroll `. + services.fprintd.enable = true; + services.fprintd.tod.enable = true; + services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; + # Allows for updating firmware via `fwupdmgr`. services.fwupd.enable = true; } diff --git a/dell/xps/13-9333/default.nix b/dell/xps/13-9333/default.nix index 3aa0bf6..a17c094 100644 --- a/dell/xps/13-9333/default.nix +++ b/dell/xps/13-9333/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: { +{ imports = [ ../../../common/cpu/intel ../../../common/pc/laptop diff --git a/flake.nix b/flake.nix index 051974e..c3db404 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; dell-latitude-5520 = import ./dell/latitude/5520; + dell-latitude-7390 = import ./dell/latitude/7390; dell-latitude-7430 = import ./dell/latitude/7430; dell-latitude-7490 = import ./dell/latitude/7490; dell-poweredge-r7515 = import ./dell/poweredge/r7515; @@ -78,19 +79,25 @@ gpd-p2-max = import ./gpd/p2-max; gpd-pocket-3 = import ./gpd/pocket-3; gpd-win-2 = import ./gpd/win-2; + gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; hp-elitebook-2560p = import ./hp/elitebook/2560p; 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-notebook-14-df0023 = import ./hp/notebook/14-df0023; intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; + lenovo-ideapad-s145-15api = import ./lenovo/ideapad/s145-15api; lenovo-legion-15ach6 = import ./lenovo/legion/15ach6; lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h; lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h; lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; + lenovo-legion-16achg6-hybrid = import ./lenovo/legion/16achg6/hybrid; + lenovo-legion-16achg6-nvidia = import ./lenovo/legion/16achg6/nvidia; + lenovo-legion-16aph8 = import ./lenovo/legion/16aph8; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; @@ -149,6 +156,7 @@ lenovo-thinkpad-x1-nano-gen1 = import ./lenovo/thinkpad/x1-nano/gen1; lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13; lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13/yoga; + lenovo-thinkpad-x13-yoga-3th-gen = import ./lenovo/thinkpad/x13/yoga/3th-gen; lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e; lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s; lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220; @@ -202,6 +210,7 @@ system76-darp6 = import ./system76/darp6; toshiba-swanky = import ./toshiba/swanky; tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; + tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7; tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2; common-cpu-amd = import ./common/cpu/amd; diff --git a/framework/13-inch/13th-gen-intel/README.md b/framework/13-inch/13th-gen-intel/README.md index 8f3b7a4..89e2694 100644 --- a/framework/13-inch/13th-gen-intel/README.md +++ b/framework/13-inch/13th-gen-intel/README.md @@ -13,3 +13,43 @@ Then run ```sh $ fwupdmgr update ``` + +## Getting the fingerprint sensor to work + +The firmware on the fingerprint sensor needs a downgrade to make it work on Linux. +The process is documented [here](https://knowledgebase.frame.work/en_us/updating-fingerprint-reader-firmware-on-linux-for-13th-gen-and-amd-ryzen-7040-series-laptops-HJrvxv_za). + +However on recent NixOS versions also fwupd can no longer update the firmware. +Using the following snippet allows to temporarly downgrade fwupd to an old-enough version: + +```nix +{ + services.fwupd.enable = true; + # we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware + services.fwupd.package = (import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz"; + sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk"; + }) { + inherit (pkgs) system; + }).fwupd; +} +``` + +Afterwards the downgraded driver can be downloaded and installed like this: + +``` +wget https://github.com/FrameworkComputer/linux-docs/raw/main/goodix-moc-609c-v01000330.cab +sudo fwupdtool install --allow-reinstall --allow-older goodix-moc-609c-v01000330.cab +Loading… [ - ]/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/f55npw04a2s6xmrbx4jw12xq16b3avb8-gvfs-1.52.1/lib/gio/modules/libgvfsdbus.so) +Failed to load module: /nix/store/f55npw04a2s6xmrbx4jw12xq16b3avb8-gvfs-1.52.1/lib/gio/modules/libgvfsdbus.so +Loading… [ ]12:16:46.348 FuHistory schema version 9 is unknown +Writing… [************************************* ]12:16:57.055 FuEngine failed to update-cleanup after failed update: failed to get device before update cleanup: failed to wait for detach replug: device d432baa2162a32c1554ef24bd8281953b9d07c11 did not come back + +failed to write: failed to reply: transfer timed out +``` + +The error message above is harmless. After a reboot, I was able to enroll my fingerprint like this: + +``` +sudo fprintd-enroll $USER +``` diff --git a/framework/13-inch/common/amd.nix b/framework/13-inch/common/amd.nix index 249f6f3..f5341b6 100644 --- a/framework/13-inch/common/amd.nix +++ b/framework/13-inch/common/amd.nix @@ -1,10 +1,13 @@ -{ lib, ... }: { +{ lib, config, ... }: { imports = [ ../../../common/cpu/amd ../../../common/cpu/amd/pstate.nix ../../../common/gpu/amd ]; + # 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; diff --git a/framework/13-inch/common/intel.nix b/framework/13-inch/common/intel.nix index d5c68ef..fb5c4ce 100644 --- a/framework/13-inch/common/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -15,6 +15,9 @@ # https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") (lib.mkDefault pkgs.linuxPackages_latest); + # Module is not used for Framework EC but causes boot time error log. + boot.blacklistedKernelModules = [ "cros-usbpd-charger" ]; + # Custom udev rules services.udev.extraRules = '' # Fix headphone noise when on powersave diff --git a/friendlyarm/nanopi-r5s/default.nix b/friendlyarm/nanopi-r5s/default.nix index 019b5b8..b7ecb91 100644 --- a/friendlyarm/nanopi-r5s/default.nix +++ b/friendlyarm/nanopi-r5s/default.nix @@ -1,5 +1,4 @@ { lib -, pkgs , ... }: diff --git a/gpd/win-2/default.nix b/gpd/win-2/default.nix index 522b62f..aaaba37 100644 --- a/gpd/win-2/default.nix +++ b/gpd/win-2/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ...}: +{ config, lib, ...}: { imports = [ ../../common/cpu/intel diff --git a/gpd/win-max-2/2023/default.nix b/gpd/win-max-2/2023/default.nix new file mode 100644 index 0000000..1f1745f --- /dev/null +++ b/gpd/win-max-2/2023/default.nix @@ -0,0 +1,15 @@ +{ config, lib, ...}: +with lib; +{ + imports = [ + ./.. + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ]; + + # fix suspend problem: https://www.reddit.com/r/gpdwin/comments/16veksm/win_max_2_2023_linux_experience_suspend_problems/ + services.udev.extraRules = '' + ACTION=="add" SUBSYSTEM=="pci" ATTR{vendor}=="0x1022" ATTR{device}=="0x14ee" ATTR{power/wakeup}="disabled" + ''; +} diff --git a/gpd/win-max-2/default.nix b/gpd/win-max-2/default.nix new file mode 100644 index 0000000..ae821a3 --- /dev/null +++ b/gpd/win-max-2/default.nix @@ -0,0 +1,67 @@ +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.hardware.gpd.ppt; +in +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/ssd + ../../common/hidpi.nix + ]; + + # Linux default PPT is 24-22-22, BIOS default PPT is 35-32-28. It can be controlled by ryzenadj. + + # NOTICE: Whenever you can limit PPT to 15W by pressing Fn + Shift to enter quiet mode. + + options.hardware.gpd.ppt = { + enable = mkEnableOption (mdDoc "Enable PPT control for device by ryzenadj.") // { + # Default increase PPT to the BIOS default when power adapter plugin to increase performance. + default = true; + }; + + adapter = { + fast-limit = mkOption { + description = "Fast PTT Limit(milliwatt) when power adapter plugin."; + default = 35000; + type = types.ints.unsigned; + }; + slow-limit = mkOption { + description = "Slow PTT Limit(milliwatt) when power adapter plugin."; + default = 32000; + type = types.ints.unsigned; + }; + stapm-limit = mkOption { + description = "Stapm PTT Limit(milliwatt) when power adapter plugin."; + default = 28000; + type = types.ints.unsigned; + }; + }; + + battery = { + fast-limit = mkOption { + description = "Fast PTT Limit(milliwatt) when using battery."; + default = 24000; + type = types.ints.unsigned; + }; + slow-limit = mkOption { + description = "Slow PTT Limit(milliwatt) when using battery."; + default = 22000; + type = types.ints.unsigned; + }; + stapm-limit = mkOption { + description = "Stapm PTT Limit(milliwatt) when using battery."; + default = 22000; + type = types.ints.unsigned; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.ryzenadj ]; + services.udev.extraRules = '' + SUBSYSTEM=="power_supply", KERNEL=="ADP1", ATTR{online}=="1", RUN+="${pkgs.ryzenadj}/bin/ryzenadj --stapm-limit ${toString cfg.adapter.stapm-limit} --fast-limit ${toString cfg.adapter.fast-limit} --slow-limit ${toString cfg.adapter.slow-limit}" + SUBSYSTEM=="power_supply", KERNEL=="ADP1", ATTR{online}=="0", RUN+="${pkgs.ryzenadj}/bin/ryzenadj --stapm-limit ${toString cfg.battery.stapm-limit} --fast-limit ${toString cfg.battery.fast-limit} --slow-limit ${toString cfg.battery.slow-limit}" + ''; + }; +} diff --git a/hardkernel/odroid-h3/default.nix b/hardkernel/odroid-h3/default.nix index 435ef89..e52d3a0 100644 --- a/hardkernel/odroid-h3/default.nix +++ b/hardkernel/odroid-h3/default.nix @@ -1,5 +1,3 @@ -{ config, lib, ... }: - { imports = [ ../../common/cpu/intel/jasper-lake diff --git a/hp/elitebook/845/g7/default.nix b/hp/elitebook/845/g7/default.nix index 6c0cb49..60afe6a 100644 --- a/hp/elitebook/845/g7/default.nix +++ b/hp/elitebook/845/g7/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, lib, ... }: { imports = diff --git a/hp/elitebook/845/g8/default.nix b/hp/elitebook/845/g8/default.nix new file mode 100644 index 0000000..60afe6a --- /dev/null +++ b/hp/elitebook/845/g8/default.nix @@ -0,0 +1,25 @@ +{ pkgs, lib, ... }: + +{ + imports = + [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/pc/laptop + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/ssd + ]; + + hardware.enableRedistributableFirmware = lib.mkDefault true; + boot.kernelModules = [ "synaptics_usb" ]; + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.3") (lib.mkDefault pkgs.linuxPackages_latest); + + # disable Scatter/Gather APU recently enabled by default, + # which results in white screen after display reconfiguration + boot.kernelParams = [ "amdgpu.sg_display=0" ]; + + services.xserver = { + videoDrivers = [ "amdgpu" ]; + }; +} diff --git a/hp/elitebook/845/g9/default.nix b/hp/elitebook/845/g9/default.nix index 6c0cb49..60afe6a 100644 --- a/hp/elitebook/845/g9/default.nix +++ b/hp/elitebook/845/g9/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ pkgs, lib, ... }: { imports = diff --git a/lenovo/ideapad/s145-15api/default.nix b/lenovo/ideapad/s145-15api/default.nix new file mode 100644 index 0000000..802e0be --- /dev/null +++ b/lenovo/ideapad/s145-15api/default.nix @@ -0,0 +1,16 @@ +{ + imports = [ + ../../../common/cpu/amd + ../../../common/gpu/amd + ../../../common/gpu/amd/southern-islands + ]; + + # Blacklist ideapad-laptop because it keeps resetting rfkill devices + boot.blacklistedKernelModules = [ "ideapad-laptop" ]; + + # For some reason we have to specify manually which model we want snd-hda-intel to use + # without it external microphone won't work + boot.extraModprobeConfig = '' + options snd-hda-intel model=alc255-acer,dell-headset-multi + ''; +} diff --git a/lenovo/ideapad/slim-5/default.nix b/lenovo/ideapad/slim-5/default.nix index a830c0b..c71052d 100644 --- a/lenovo/ideapad/slim-5/default.nix +++ b/lenovo/ideapad/slim-5/default.nix @@ -1,5 +1,3 @@ -{ lib, ... }: - { imports = [ ../../../common/cpu/amd diff --git a/lenovo/legion/15ach6/default.nix b/lenovo/legion/15ach6/default.nix index 4844f79..a3c00fd 100644 --- a/lenovo/legion/15ach6/default.nix +++ b/lenovo/legion/15ach6/default.nix @@ -1,7 +1,5 @@ { lib, config, ... }: -let - inherit (config.boot) kernelPackages; -in { +{ imports = [ ../../../common/cpu/amd ../../../common/gpu/amd diff --git a/lenovo/legion/16achg6/README.md b/lenovo/legion/16achg6/README.md new file mode 100644 index 0000000..16f86be --- /dev/null +++ b/lenovo/legion/16achg6/README.md @@ -0,0 +1,23 @@ +I personally use my laptop with an external display attached and haven't observed any issues so far. + +From my experience, it's better to use gdm, as sddm seems to have a problem detecting the external monitor (more details available [here](https://github.com/sddm/sddm/issues/1558)). Of course it's not a blocker, as it is still possible to log in using sddm. I personally find it annoying that my main display remains idle. + +## Setup at the time of testing +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.1.62, NixOS, 23.05 (Stoat), 23.05.20231116.9fb1225` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.13.6` + - channels(beko): `"home-manager-23.05.tar.gz"` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` + ``` + ``` + $ lspci +... +01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1) +... +05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c5) +... +``` \ No newline at end of file diff --git a/lenovo/legion/16achg6/hybrid/default.nix b/lenovo/legion/16achg6/hybrid/default.nix new file mode 100644 index 0000000..fa69491 --- /dev/null +++ b/lenovo/legion/16achg6/hybrid/default.nix @@ -0,0 +1,28 @@ +{ lib, ... }: + +{ + imports = [ + ../../../../common/cpu/amd + ../../../../common/cpu/amd/pstate.nix + ../../../../common/gpu/amd + ../../../../common/gpu/nvidia/prime.nix + ../../../../common/pc/laptop + ../../../../common/pc/laptop/ssd + ]; + + services.xserver.videoDrivers = [ "nvidia" ]; + boot.initrd.kernelModules = [ "amdgpu" ]; + + hardware = { + nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + open = lib.mkDefault false; + + prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + }; +} \ No newline at end of file diff --git a/lenovo/legion/16achg6/nvidia/default.nix b/lenovo/legion/16achg6/nvidia/default.nix new file mode 100644 index 0000000..af0f2d6 --- /dev/null +++ b/lenovo/legion/16achg6/nvidia/default.nix @@ -0,0 +1,13 @@ +{ ... }: + +{ + imports = [ ../hybrid ]; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware = { + nvidia.prime.offload.enable = false; + amdgpu = { + amdvlk = false; + opencl = false; + }; + }; +} \ No newline at end of file diff --git a/lenovo/legion/16aph8/README.md b/lenovo/legion/16aph8/README.md new file mode 100644 index 0000000..a18718d --- /dev/null +++ b/lenovo/legion/16aph8/README.md @@ -0,0 +1,38 @@ +I was unable to get the hybrid settings working well with lightdm or sddm, but Optimus Sync +mode seems to work the best for me. + +I am running the Linux 6.6 LTS kernel with KDE + SDDM, and it seems to be working well. + +## hardware-configuration.nix + +I have the following customizations added for my nvidia drivers. + +``` +hardware.nvidia = { + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; +}; +``` + +## Setup at the time of testing + +### nix-info +``` +$ nix-info -m + - system: `"x86_64-linux"` + - host os: `Linux 6.6.8, NixOS, 23.11 (Tapir), 23.11.20231231.32f6357` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.18.1` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` +``` + +### lspci +``` +$ lspci +... +01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] (rev a1) +... +05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 (rev c2) +... +``` diff --git a/lenovo/legion/16aph8/default.nix b/lenovo/legion/16aph8/default.nix new file mode 100644 index 0000000..4718cd3 --- /dev/null +++ b/lenovo/legion/16aph8/default.nix @@ -0,0 +1,39 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/gpu/nvidia + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + # Use latest LTS kernel for more Raphael fixes + boot = lib.mkMerge [ + (lib.mkIf (lib.versionOlder pkgs.linux.version "6.6") { + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = ["amdgpu.sg_display=0"]; + }) + ]; + + hardware.nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault false; + powerManagement.finegrained = lib.mkDefault false; + open = lib.mkDefault false; + prime = { + sync.enable = lib.mkDefault true; + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # Avoid issues with modesetting causing blank screen + services.xserver.videoDrivers = [ "nvidia" ]; + + # 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; +} diff --git a/lenovo/legion/16irx8h/default.nix b/lenovo/legion/16irx8h/default.nix index 7249c1d..cfbcb8a 100644 --- a/lenovo/legion/16irx8h/default.nix +++ b/lenovo/legion/16irx8h/default.nix @@ -1,7 +1,6 @@ { lib, config, - pkgs, ... }: { imports = [ diff --git a/lenovo/thinkpad/t440p/default.nix b/lenovo/thinkpad/t440p/default.nix index 144b7d0..241fc09 100644 --- a/lenovo/thinkpad/t440p/default.nix +++ b/lenovo/thinkpad/t440p/default.nix @@ -1,5 +1,3 @@ -{ lib, ... }: - { imports = [ ../. diff --git a/lenovo/thinkpad/x13/yoga/3th-gen/default.nix b/lenovo/thinkpad/x13/yoga/3th-gen/default.nix new file mode 100644 index 0000000..1b02f61 --- /dev/null +++ b/lenovo/thinkpad/x13/yoga/3th-gen/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: { + imports = [ + ../. + ]; + + # without throttled, our CPU (i5-1235u) did not boost beyond 1300MHz + services.throttled.enable = lib.mkDefault true; +} diff --git a/microchip/icicle-kit/default.nix b/microchip/icicle-kit/default.nix index 19fb228..db57816 100644 --- a/microchip/icicle-kit/default.nix +++ b/microchip/icicle-kit/default.nix @@ -1,5 +1,3 @@ -{ pkgs, lib, ... }: - { nixpkgs.overlays = [ (import ./overlay.nix) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index d4ac2fd..485c0e2 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -10,7 +10,7 @@ in { ./surface-control ]; - microsoft-surface.kernelVersion = mkDefault "6.6.2"; + microsoft-surface.kernelVersion = mkDefault "6.6.8"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/ipts/default.nix b/microsoft/surface/common/ipts/default.nix index 4d19aa0..8e1f475 100644 --- a/microsoft/surface/common/ipts/default.nix +++ b/microsoft/surface/common/ipts/default.nix @@ -1,13 +1,33 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf mkMerge; + inherit (lib) mkDefault mkEnableOption mkIf mkMerge mkOption types; cfg = config.microsoft-surface.ipts; -in { + iptsConfFile = pkgs.writeTextFile { + name = "iptsd.conf"; + text = lib.generators.toINI { } cfg.config; + }; + +in +{ options.microsoft-surface.ipts = { enable = mkEnableOption "Enable IPTSd for Microsoft Surface"; + + config = mkOption { + type = types.attrs; + default = { }; + description = '' + Values to wrote to iptsd.conf, first key is section, second key is property. + See the example config; https://github.com/linux-surface/iptsd/blob/v1.4.0/etc/iptsd.conf + ''; + example = '' + DFT = { + ButtonMinMag = 1000; + }; + ''; + }; }; config = mkMerge [ @@ -22,6 +42,7 @@ in { script = "iptsd $(iptsd-find-hidraw)"; wantedBy = [ "multi-user.target" ]; }; + environment.etc."iptsd/iptsd.conf".source = "${iptsConfFile}"; }) ]; } diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index 481755d..992ec9b 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -6,7 +6,6 @@ let in { imports = [ ./linux-6.1.x - ./linux-6.5.x ./linux-6.6.x ]; diff --git a/microsoft/surface/common/kernel/linux-6.1.x/default.nix b/microsoft/surface/common/kernel/linux-6.1.x/default.nix index 45105cc..fb9c35e 100644 --- a/microsoft/surface/common/kernel/linux-6.1.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.x/default.nix @@ -27,10 +27,10 @@ let in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ version ]; + type = types.enum [ version majorVersion ]; }; - config = mkIf (cfg.kernelVersion == version ) { + config = mkIf (cfg.kernelVersion == version || cfg.kernelVersion == majorVersion) { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.5.x/default.nix b/microsoft/surface/common/kernel/linux-6.5.x/default.nix deleted file mode 100644 index 0d90108..0000000 --- a/microsoft/surface/common/kernel/linux-6.5.x/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - inherit (lib) mkIf mkOption types; - inherit (pkgs) fetchurl; - - inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage1 repos; - - cfg = config.microsoft-surface; - - version = "6.5.11"; - extraMeta.branch = "6.5"; - patchSrc = repos.linux-surface + "/patches/${extraMeta.branch}"; - kernelPatches = pkgs.callPackage ./patches.nix { - inherit (lib) kernel; - inherit version patchSrc; - }; - - kernelPackages = linuxPackage1 { - inherit version extraMeta kernelPatches; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-LuJK+SgrgJI7LaVrcKrX3y6O5OPwdkUuBbpmviBZtRk="; - }; - }; - - -in { - options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ version ]; - }; - - config = mkIf (cfg.kernelVersion == version) { - boot = { - inherit kernelPackages; - }; - }; -} diff --git a/microsoft/surface/common/kernel/linux-6.5.x/patches.nix b/microsoft/surface/common/kernel/linux-6.5.x/patches.nix deleted file mode 100644 index 148f8b2..0000000 --- a/microsoft/surface/common/kernel/linux-6.5.x/patches.nix +++ /dev/null @@ -1,143 +0,0 @@ -{ lib, - kernel ? lib.kernel, - patchSrc, - version, -}: - -[ - { - name = "microsoft-surface-patches-linux-${version}"; - patch = null; - structuredExtraConfig = with kernel; { - STREAMING_MEDIA = yes; - - # - # Surface Aggregator Module - # - SURFACE_AGGREGATOR = module; - SURFACE_AGGREGATOR_ERROR_INJECTION = no; - SURFACE_AGGREGATOR_BUS = yes; - SURFACE_AGGREGATOR_CDEV = module; - SURFACE_AGGREGATOR_HUB = module; - SURFACE_AGGREGATOR_REGISTRY = module; - SURFACE_AGGREGATOR_TABLET_SWITCH = module; - - SURFACE_ACPI_NOTIFY = module; - SURFACE_DTX = module; - SURFACE_PLATFORM_PROFILE = module; - - SURFACE_HID = module; - SURFACE_KBD = module; - - BATTERY_SURFACE = module; - CHARGER_SURFACE = module; - - # - # Surface Hotplug - # - SURFACE_HOTPLUG = module; - - # - # Intel Touch Host Controller - # - HID_ITHC = module; - - # - # IPTS touchscreen - # - # This only enables the user interface for IPTS data. - # For the touchscreen to work, you need to install iptsd. - # - MISC_IPTS = module; - - # - # Cameras: IPU3 - # - VIDEO_DW9719 = module; - VIDEO_IPU3_IMGU = module; - VIDEO_IPU3_CIO2 = module; - CIO2_BRIDGE = yes; - INTEL_SKL_INT3472 = module; - REGULATOR_TPS68470 = module; - COMMON_CLK_TPS68470 = module; - COMMON_LEDS_TPS68470 = module; - - # - # Cameras: Sensor drivers - # - VIDEO_OV5693 = module; - VIDEO_OV7251 = module; - VIDEO_OV8865 = module; - - # - # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 - # - APDS9960 = module; - - # - # Other Drivers - # - INPUT_SOC_BUTTON_ARRAY = module; - SURFACE_3_POWER_OPREGION = module; - SURFACE_PRO3_BUTTON = module; - SURFACE_GPE = module; - SURFACE_BOOK1_DGPU_SWITCH = module; - }; - } - { - name = "ms-surface/0001-surface3-oemb"; - patch = patchSrc + "/0001-surface3-oemb.patch"; - } - { - name = "ms-surface/0002-mwifiex"; - patch = patchSrc + "/0002-mwifiex.patch"; - } - { - name = "ms-surface/0003-ath10k"; - patch = patchSrc + "/0003-ath10k.patch"; - } - { - name = "ms-surface/0004-ipts"; - patch = patchSrc + "/0004-ipts.patch"; - } - { - name = "ms-surface/0005-ithc"; - patch = patchSrc + "/0005-ithc.patch"; - } - { - name = "ms-surface/0006-surface-sam"; - patch = patchSrc + "/0006-surface-sam.patch"; - } - { - name = "ms-surface/0007-surface-sam-over-hid"; - patch = patchSrc + "/0007-surface-sam-over-hid.patch"; - } - { - name = "ms-surface/0008-surface-button"; - patch = patchSrc + "/0008-surface-button.patch"; - } - { - name = "ms-surface/0009-surface-typecover"; - patch = patchSrc + "/0009-surface-typecover.patch"; - } - { - name = "ms-surface/0010-surface-shutdown"; - patch = patchSrc + "/0010-surface-shutdown.patch"; - } - { - name = "ms-surface/0011-surface-gpe"; - patch = patchSrc + "/0011-surface-gpe.patch"; - } - { - name = "ms-surface/0012-cameras"; - patch = patchSrc + "/0012-cameras.patch"; - } - { - name = "ms-surface/0013-amd-gpio"; - patch = patchSrc + "/0013-amd-gpio.patch"; - } - { - name = "ms-surface/0014-rtc"; - patch = patchSrc + "/0014-rtc.patch"; - } -] diff --git a/microsoft/surface/common/kernel/linux-6.6.x/default.nix b/microsoft/surface/common/kernel/linux-6.6.x/default.nix index e0a3449..904938c 100644 --- a/microsoft/surface/common/kernel/linux-6.6.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.6.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.6.2"; + version = "6.6.8"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage2 { inherit version kernelPatches; - sha256 = "sha256-c9T2rY3WrCpB7VLCkoiYt8PyUZ7V29sRkgIJo2mZt34="; + sha256 = "sha256-UDbENOEeSzbY2j9ImFH3+CnPeF+n94h0aFN6nqRXJBY="; }; in { diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 9c2793c..69e3122 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "a6eafcad32dc789ae92f42636b11e9aae6e7c879"; #b82e8acd3c015190423b114770b0e9fcc206dd2d"; - hash = "sha256-GfxRzxFxDZoSZyEOzxr/Hz0IonbuwzkGaisKl3VYvlI="; #sha256-parp1F5fFzKkiM6ILK+ZolMdSwU1kLOOMvksSwE/zKA="; + rev = "arch-6.6.6-1"; + hash = "sha256-0pP/A0XllR/iheIBEBwEApaXpyFYzsnGZ+wdm4w5Jjg="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: diff --git a/morefine/m600/default.nix b/morefine/m600/default.nix index db4ed24..4879076 100644 --- a/morefine/m600/default.nix +++ b/morefine/m600/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ...}: { +{ lib, ...}: { imports = [ ../../common/cpu/amd ../../common/cpu/amd/pstate.nix diff --git a/olimex/teres_i/default.nix b/olimex/teres_i/default.nix index 34bec53..f72cb1d 100644 --- a/olimex/teres_i/default.nix +++ b/olimex/teres_i/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ...}: +{ lib, pkgs, ...}: { hardware.deviceTree = { diff --git a/onenetbook/4/default.nix b/onenetbook/4/default.nix index 9ac16b5..6b108b4 100644 --- a/onenetbook/4/default.nix +++ b/onenetbook/4/default.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib, ... }: +{ config, ... }: { imports = [ diff --git a/pine64/rockpro64/default.nix b/pine64/rockpro64/default.nix index a4d3136..9ac08e8 100644 --- a/pine64/rockpro64/default.nix +++ b/pine64/rockpro64/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ lib, ... }: { boot.initrd.kernelModules = [ # PCIe/NVMe diff --git a/pine64/star64/firmware.nix b/pine64/star64/firmware.nix index c300de4..e0173a6 100644 --- a/pine64/star64/firmware.nix +++ b/pine64/star64/firmware.nix @@ -1,4 +1,4 @@ -{ callPackage, pkgsBuildHost, runCommand, writeText, writeShellApplication +{ callPackage, pkgsBuildHost, writeText, writeShellApplication , stdenv, dtc, mtdutils, coreutils }: let uboot = callPackage ./uboot.nix { }; diff --git a/pine64/star64/sd-image.nix b/pine64/star64/sd-image.nix index 03d5508..07d00ae 100644 --- a/pine64/star64/sd-image.nix +++ b/pine64/star64/sd-image.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, modulesPath, ... }: +{ config, pkgs, modulesPath, ... }: let firmware = pkgs.callPackage ./firmware.nix { }; in { diff --git a/purism/librem/5r4/initrd.nix b/purism/librem/5r4/initrd.nix index 7ffe609..e82d5cf 100644 --- a/purism/librem/5r4/initrd.nix +++ b/purism/librem/5r4/initrd.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: lib.mkIf config.hardware.librem5.customInitrdModules { boot.initrd = { kernelModules = [ diff --git a/purism/librem/5r4/kernel/kernel.nix b/purism/librem/5r4/kernel/kernel.nix index 73c7323..28f5958 100644 --- a/purism/librem/5r4/kernel/kernel.nix +++ b/purism/librem/5r4/kernel/kernel.nix @@ -6,14 +6,14 @@ buildLinux (args // rec { defconfig = "librem5_defconfig"; - version = "6.5.6-librem5"; + version = "6.6.6-librem5"; modDirVersion = version; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; repo = "linux"; - rev = "pureos/6.5.6pureos1"; - hash = "sha256-hOv0oy31mbC+43sI1n1oqKl7TtT/Ivj6UhiW4maumCg="; + rev = "pureos/6.6.6pureos1"; + hash = "sha256-LJfY45yNYgFYLCGxb+WRMYBUHnY4HCI2rkflPeaeFe0="; }; kernelPatches = [ ]; structuredExtraConfig = with lib.kernel; { diff --git a/purism/librem/5r4/u-boot/default.nix b/purism/librem/5r4/u-boot/default.nix index 78e6066..26c217c 100644 --- a/purism/librem/5r4/u-boot/default.nix +++ b/purism/librem/5r4/u-boot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, gcc11Stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, flex, bison }: +{ stdenv, gcc11Stdenv, buildUBoot, fetchurl, fetchFromGitLab, lib, bison }: let firmware-imx = stdenv.mkDerivation (fa: { pname = "firmware-imx"; diff --git a/purism/librem/5r4/wifi.nix b/purism/librem/5r4/wifi.nix index f469a4f..5313aee 100644 --- a/purism/librem/5r4/wifi.nix +++ b/purism/librem/5r4/wifi.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: lib.mkIf (config.hardware.librem5.wifiCard == "redpine") { # Disable mainline rsi module boot.blacklistedKernelModules = [ diff --git a/starfive/visionfive/v2/firmware.nix b/starfive/visionfive/v2/firmware.nix index f2e6861..eabeb6c 100644 --- a/starfive/visionfive/v2/firmware.nix +++ b/starfive/visionfive/v2/firmware.nix @@ -1,78 +1,26 @@ -{ callPackage, pkgsBuildHost, runCommand, writeText, writeShellApplication -, stdenv, dtc, mtdutils, coreutils }: -let - uboot = callPackage ./uboot.nix { }; - opensbi = callPackage ./opensbi.nix { - withPayload = "${uboot}/u-boot.bin"; - withFDT = "${uboot}/starfive_visionfive2.dtb"; - }; - spl-tool = pkgsBuildHost.callPackage ./spl-tool.nix { }; - its-file = writeText "visionfive2-uboot-fit-image.its" '' - /dts-v1/; +{ callPackage +, writeShellApplication +, stdenv +, mtdutils +}: - / { - description = "U-boot-spl FIT image for JH7110 VisionFive2"; - #address-cells = <2>; - - images { - firmware { - description = "u-boot"; - data = /incbin/("${opensbi}/share/opensbi/lp64/generic/firmware/fw_payload.bin"); - type = "firmware"; - arch = "riscv"; - os = "u-boot"; - load = <0x0 0x40000000>; - entry = <0x0 0x40000000>; - compression = "none"; - }; - }; - - configurations { - default = "config-1"; - - config-1 { - description = "U-boot-spl FIT config for JH7110 VisionFive2"; - firmware = "firmware"; - }; - }; - }; - ''; -in rec { - inherit opensbi uboot; - spl = stdenv.mkDerivation { - name = "starfive-visionfive2-spl"; - depsBuildBuild = [ spl-tool ]; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/share/starfive-visionfive2/ - ln -s ${uboot}/u-boot-spl.bin . - spl_tool -c -f ./u-boot-spl.bin - cp u-boot-spl.bin.normal.out $out/share/starfive-visionfive2/spl.bin - ''; - }; - uboot-fit-image = stdenv.mkDerivation { - name = "starfive-visionfive2-uboot-fit-image"; - nativeBuildInputs = [ dtc ]; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/share/starfive-visionfive2/ - ${uboot}/mkimage -f ${its-file} -A riscv -O u-boot -T firmware $out/share/starfive-visionfive2/visionfive2_fw_payload.img - ''; - }; +rec { + opensbi = callPackage ./opensbi.nix { }; + uboot = callPackage ./uboot.nix { inherit opensbi; }; updater-flash = writeShellApplication { name = "visionfive2-firmware-update-flash"; runtimeInputs = [ mtdutils ]; text = '' - flashcp -v ${spl}/share/starfive-visionfive2/spl.bin /dev/mtd0 - flashcp -v ${uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img /dev/mtd1 + flashcp -v ${uboot}/u-boot-spl.bin.normal.out /dev/mtd0 + flashcp -v ${uboot}/u-boot.itb /dev/mtd2 ''; }; updater-sd = writeShellApplication { name = "visionfive2-firmware-update-sd"; runtimeInputs = [ ]; text = '' - dd if=${spl}/share/starfive-visionfive2/spl.bin of=/dev/mmcblk0p1 conv=fsync - dd if=${uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img of=/dev/mmcblk0p2 conv=fsync + dd if=${uboot}/u-boot-spl.bin.normal.out of=/dev/mmcblk0p1 conv=fsync + dd if=${uboot}/u-boot.itb of=/dev/mmcblk0p2 conv=fsync ''; }; } diff --git a/starfive/visionfive/v2/opensbi.nix b/starfive/visionfive/v2/opensbi.nix index 5b46fec..f551234 100644 --- a/starfive/visionfive/v2/opensbi.nix +++ b/starfive/visionfive/v2/opensbi.nix @@ -1,14 +1,13 @@ -{ opensbi, withPayload, withFDT }: +{ opensbi }: -(opensbi.override { - inherit withPayload withFDT; -}).overrideAttrs (attrs: { +opensbi.overrideAttrs (attrs: { makeFlags = attrs.makeFlags ++ [ # opensbi generic platform default FW_TEXT_START is 0x80000000 # For JH7110, need to specify the FW_TEXT_START to 0x40000000 # Otherwise, the fw_payload.bin downloading via jtag will not run. # https://github.com/starfive-tech/VisionFive2/blob/7733673d27052dc5a48f1cb1d060279dfa3f0241/Makefile#L274 + # Also matches u-boot documentation: https://docs.u-boot.org/en/latest/board/starfive/visionfive2.html "FW_TEXT_START=0x40000000" + "FW_OPTIONS=0" ]; }) - diff --git a/starfive/visionfive/v2/sd-image.nix b/starfive/visionfive/v2/sd-image.nix index 6ee39e3..7c30f9c 100644 --- a/starfive/visionfive/v2/sd-image.nix +++ b/starfive/visionfive/v2/sd-image.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, modulesPath, ... }: +{ config, pkgs, modulesPath, ... }: let firmware = pkgs.callPackage ./firmware.nix { }; in { @@ -36,10 +36,10 @@ in { EOF eval $(partx $img -o START,SECTORS --nr 1 --pairs) - dd conv=notrunc if=${firmware.spl}/share/starfive-visionfive2/spl.bin of=$img seek=$START count=$SECTORS + dd conv=notrunc if=${firmware.uboot}/u-boot-spl.bin.normal.out of=$img seek=$START count=$SECTORS eval $(partx $img -o START,SECTORS --nr 2 --pairs) - dd conv=notrunc if=${firmware.uboot-fit-image}/share/starfive-visionfive2/visionfive2_fw_payload.img of=$img seek=$START count=$SECTORS + dd conv=notrunc if=${firmware.uboot}/u-boot.itb of=$img seek=$START count=$SECTORS ''; populateRootCommands = '' diff --git a/starfive/visionfive/v2/uboot.nix b/starfive/visionfive/v2/uboot.nix index 9666175..c9fde3d 100644 --- a/starfive/visionfive/v2/uboot.nix +++ b/starfive/visionfive/v2/uboot.nix @@ -1,20 +1,36 @@ -{ fetchFromGitHub, buildUBoot }: +{ lib +, fetchFromGitHub +, buildUBoot +, buildPackages +, opensbi +}: buildUBoot rec { - version = "3.8.2"; + version = "2024.01-rc5"; src = fetchFromGitHub { - owner = "starfive-tech"; + owner = "u-boot"; repo = "u-boot"; - rev = "refs/tags/VF2_v${version}"; - hash = "sha256-M/ndil++spcJCYnpYLb+fuxqCi4H3BunXdHbl529ovM="; + rev = "refs/tags/v${version}"; + hash = "sha256-QlwgvnSaXh39z9AM7HNF731lRiUkPbN3oQyioQNTYFA="; }; + # workaround for https://github.com/NixOS/nixpkgs/pull/146634 + # uboot: only apply raspberry pi patches to raspberry pi builds + patches = [ ]; + + extraMakeFlags = [ + # workaround for https://github.com/NixOS/nixpkgs/pull/277997 + # buildUBoot: specify absolute path of dtc, fix building u-boot 2023.10+ + "DTC=${lib.getExe buildPackages.dtc}" + + "OPENSBI=${opensbi}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin" + ]; + defconfig = "starfive_visionfive2_defconfig"; + filesToInstall = [ - "u-boot.bin" - "arch/riscv/dts/starfive_visionfive2.dtb" - "spl/u-boot-spl.bin" - "tools/mkimage" + "spl/u-boot-spl.bin.normal.out" + "u-boot.itb" ]; } diff --git a/tests/build-profile.nix b/tests/build-profile.nix index bdde5df..e4e1cdb 100644 --- a/tests/build-profile.nix +++ b/tests/build-profile.nix @@ -1,7 +1,9 @@ -{ profile }: +{ profile, pkgs }: -let - shim = { config, lib, pkgs, ... }: { +(pkgs.nixos [ + profile + ({ config, lib, ... }: { + nixpkgs.pkgs = pkgs; boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable && !config.boot.loader.raspberryPi.enable; # we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end. boot.loader.grub.enable = false; @@ -14,13 +16,6 @@ let device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; fsType = "btrfs"; }; - - nixpkgs.config = { - allowBroken = true; - allowUnfree = true; - nvidia.acceptLicense = true; - }; - }; -in (import { - configuration.imports = [ profile shim ]; -}).system + system.stateVersion = lib.version; + }) +]).config.system.build.toplevel diff --git a/tests/pyproject.toml b/tests/pyproject.toml new file mode 100644 index 0000000..ede24cb --- /dev/null +++ b/tests/pyproject.toml @@ -0,0 +1,64 @@ +[tool.ruff] +line-length = 88 +target-version = "py311" + +select = ["ALL"] +ignore = [ + # pydocstyle + "D", + # todo comments + "TD", + # fixmes + "FIX", + + # Unused function argument + "ARG001", + + # Shebang should contain `python` + "EXE003", + # Shebang should be at the beginning of the file + "EXE005", + + # Missing type annotation for `self` in method + "ANN101", + # Dynamically typed expressions (typing.Any) + "ANN401", + # Trailing comma missing + "COM812", + # Unnecessary `dict` call (rewrite as a literal) + "C408", + # Boolean-typed positional argument in function definition + "FBT001", + # Logging statement uses f-string + "G004", + # disabled on ruff's recommendation as causes problems with the formatter + "ISC001", + # Use of `assert` detected + "S101", + # `subprocess` call: check for execution of untrusted input + "S603", + # Starting a process with a partial executable path + "S607", + # Boolean default positional argument in function definition + "FBT002", + + # Too many statements + "PLR0915", + # Too many arguments in function definition + "PLR0913", + "PLR0912", # Too many branches + # $X is too complex + "C901", + + "E501", # line too long + "T201", # `print` found + "PLR2004", # Magic value used in comparison +] + +[tool.mypy] +python_version = "3.11" +warn_redundant_casts = true +disallow_untyped_calls = true +disallow_untyped_defs = true +no_implicit_optional = true +pretty = true diff --git a/tests/run.py b/tests/run.py index 8cc92f9..8ad6025 100755 --- a/tests/run.py +++ b/tests/run.py @@ -1,14 +1,16 @@ #!/usr/bin/env nix-shell -#!nix-shell --quiet -p nix -p python3 -i python +#!nix-shell --quiet -p nix-eval-jobs -p nix -p python3 -i python import argparse +import json import multiprocessing import re import subprocess import sys -from functools import partial +import textwrap from pathlib import Path -from typing import List, Tuple +from tempfile import TemporaryDirectory +from typing import IO TEST_ROOT = Path(__file__).resolve().parent ROOT = TEST_ROOT.parent @@ -17,53 +19,18 @@ GREEN = "\033[92m" RED = "\033[91m" RESET = "\033[0m" +re_nixos_hardware = re.compile(r"]+)>") -def parse_readme() -> List[str]: + +def parse_readme() -> list[str]: profiles = set() - with open(ROOT.joinpath("README.md")) as f: + with ROOT.joinpath("README.md").open() as f: for line in f: - results = re.findall(r"]+>", line) - profiles.update(results) + if (m := re_nixos_hardware.search(line)) is not None: + profiles.add(m.group(1).strip()) return list(profiles) -def build_profile( - profile: str, verbose: bool -) -> Tuple[str, subprocess.CompletedProcess]: - # Hard-code this for now until we have enough other architectures to care about this. - system = "x86_64-linux" - if "raspberry-pi/2" in profile: - system = "armv7l-linux" - if "raspberry-pi/4" in profile: - system = "aarch64-linux" - - cmd = [ - "nix", - "build", - "--extra-experimental-features", "nix-command", - "-f", - "build-profile.nix", - "-I", - f"nixos-hardware={ROOT}", - "--show-trace", - "--system", - system, - "--arg", - "profile", - profile, - ] - - # uses import from derivation - if profile != "": - cmd += ["--dry-run"] - if verbose: - print(f"$ {' '.join(cmd)}") - res = subprocess.run( - cmd, cwd=TEST_ROOT, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, - ) - return (profile, res) - - def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description="Run hardware tests") parser.add_argument( @@ -74,40 +41,98 @@ def parse_args() -> argparse.Namespace: "If set to 1 it disable multi processing (suitable for debugging)", ) parser.add_argument( - "--verbose", action="store_true", help="Print evaluation commands executed", + "--verbose", + action="store_true", + help="Print evaluation commands executed", ) parser.add_argument("profiles", nargs="*") return parser.parse_args() +def write_eval_test(f: IO[str], profiles: list[str]) -> None: + build_profile = TEST_ROOT.joinpath("build-profile.nix") + f.write( + textwrap.dedent( + f""" + let + purePkgs = system: import {{ + config = {{ + allowBroken = true; + allowUnfree = true; + nvidia.acceptLicense = true; + }}; + overlays = []; + inherit system; + }}; + pkgs.x86_64-linux = purePkgs "x86_64-linux"; + pkgs.aarch64-linux = purePkgs "aarch64-linux"; + buildProfile = import {build_profile}; + in + """ + ) + ) + f.write("{\n") + for profile in profiles: + # does import-from-derivation + if profile == "toshiba/swanky": + continue + # uses custom nixpkgs config + if profile == "raspberry-pi/2": + continue + + system = "x86_64-linux" + if "raspberry-pi/4" == profile: + system = "aarch64-linux" + + f.write( + f' "{profile}" = buildProfile {{ profile = import {ROOT}/{profile}; pkgs = pkgs.{system}; }};\n' + ) + f.write("}\n") + + +def run_eval_test(eval_test: Path, gcroot_dir: Path, jobs: int) -> list[str]: + failed_profiles = [] + cmd = [ + "nix-eval-jobs", + "--gc-roots-dir", + gcroot_dir, + "--max-memory-size", + "2048", + "--workers", + str(jobs), + str(eval_test), + ] + proc = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + text=True, + ) + with proc as p: + assert p.stdout is not None + for line in p.stdout: + data = json.loads(line) + attr = data.get("attr") + if "error" in data: + failed_profiles.append(attr) + print(f"{RED}FAIL {attr}:{RESET}", file=sys.stderr) + print(f"{RED}{data['error']}{RESET}", file=sys.stderr) + else: + print(f"{GREEN}OK {attr}{RESET}") + return failed_profiles + + def main() -> None: args = parse_args() - if len(args.profiles) == 0: - profiles = parse_readme() - else: - profiles = args.profiles + profiles = parse_readme() if len(args.profiles) == 0 else args.profiles failed_profiles = [] + with TemporaryDirectory() as tmpdir: + eval_test = Path(tmpdir) / "eval-test.nix" + gcroot_dir = Path(tmpdir) / "gcroot" + with eval_test.open("w") as f: + write_eval_test(f, profiles) + failed_profiles = run_eval_test(eval_test, gcroot_dir, args.jobs) - def eval_finished(args: Tuple[str, subprocess.CompletedProcess]) -> None: - profile, res = args - if res.returncode == 0: - print(f"{GREEN}OK {profile}{RESET}") - else: - print(f"{RED}FAIL {profile}:{RESET}", file=sys.stderr) - if res.stdout != "": - print(f"{RED}{res.stdout.rstrip()}{RESET}", file=sys.stderr) - print(f"{RED}{res.stderr.rstrip()}{RESET}", file=sys.stderr) - failed_profiles.append(profile) - - build = partial(build_profile, verbose=args.verbose) - if len(profiles) == 0 or args.jobs == 1: - for profile in profiles: - eval_finished(build(profile)) - else: - pool = multiprocessing.Pool(processes=args.jobs) - for r in pool.imap(build, profiles): - eval_finished(r) if len(failed_profiles) > 0: print(f"\n{RED}The following {len(failed_profiles)} test(s) failed:{RESET}") for profile in failed_profiles: diff --git a/tuxedo/infinitybook/pro14/gen7/README.md b/tuxedo/infinitybook/pro14/gen7/README.md new file mode 100644 index 0000000..674bbd4 --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen7/README.md @@ -0,0 +1 @@ +# [TUXEDO InfinityBook Pro 14 - Gen7](https://www.tuxedocomputers.com/de/TUXEDO-InfinityBook-Pro-14-Gen7.tuxedo) diff --git a/tuxedo/infinitybook/pro14/gen7/default.nix b/tuxedo/infinitybook/pro14/gen7/default.nix new file mode 100644 index 0000000..9971b7b --- /dev/null +++ b/tuxedo/infinitybook/pro14/gen7/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +{ + imports = [ + ../../../../common/cpu/intel + ../../../../common/pc/laptop + ../../../../common/pc/ssd + ]; + + # Cooling management + services.thermald.enable = lib.mkDefault true; +}