Compare commits
161 commits
lenovo-16A
...
master
Author | SHA1 | Date | |
---|---|---|---|
Aires | 148d32df92 | ||
c54cf53e02 | |||
569b23fd82 | |||
6f38f8576c | |||
d1966ef874 | |||
ddebede974 | |||
Aires | dfe45103b6 | ||
72b83c838d | |||
6ed5521636 | |||
f568ffb601 | |||
107bb46eef | |||
e6d16f1b6b | |||
14c333162b | |||
eab049fe17 | |||
e67b60fb1b | |||
b7b55739f7 | |||
0b4d40f95a | |||
1091743811 | |||
d3c993c851 | |||
60d3bae384 | |||
13d6cbde4d | |||
5bd0371d3f | |||
0550809b07 | |||
226e517854 | |||
39ac67a5fe | |||
a7432ebaef | |||
b501c5fbf6 | |||
405b654893 | |||
217b5812a2 | |||
ab165a8a6c | |||
05672b50f7 | |||
6a4ecebce5 | |||
42577dbb0f | |||
19e9c2fb7a | |||
ece5b12014 | |||
89a33c8e93 | |||
a70fa1ac5b | |||
71b92eab15 | |||
d8bfbbf614 | |||
3501b9c096 | |||
bb90787ea0 | |||
108f27f71e | |||
ede1f14cc2 | |||
9a816e3d1c | |||
9a187879f4 | |||
Aires | 13dee7858d | ||
37d3f20674 | |||
ea9f6719b1 | |||
6187754bdd | |||
c5013aa7ce | |||
6b745e2331 | |||
c5925d86de | |||
a111ce6b53 | |||
ba8294c0a1 | |||
72d3c00702 | |||
00f9c4bb06 | |||
da0aa7b533 | |||
c1cdb2f828 | |||
f75ab8b22c | |||
6e253f12b1 | |||
c6b440dcd6 | |||
d403b7f6ae | |||
a59f00f5ac | |||
43ea86cc8c | |||
8d5e6d9278 | |||
d11eeae766 | |||
231274268f | |||
d33e3e7147 | |||
40e296b2b3 | |||
d3ef6d0c7c | |||
3980e7816c | |||
14aadcba1a | |||
901bc809b5 | |||
b7d8d5c788 | |||
a5abf3379d | |||
5fe1583567 | |||
4677bf5e89 | |||
ae13b3761c | |||
f140ca626b | |||
aab67495e3 | |||
1a59c3d5ac | |||
caabc42556 | |||
c3e48cbd88 | |||
3fff0d97d1 | |||
755815160a | |||
8c144a7789 | |||
c5cdfd2a49 | |||
0cf592f520 | |||
7d87afd10b | |||
5159ef2fa0 | |||
e8232c132a | |||
4e59e4c9e9 | |||
e6d40db892 | |||
4325ebb800 | |||
63e77982fc | |||
584a5e5518 | |||
cc634b69c8 | |||
27487bcd12 | |||
68ef79e804 | |||
083823b790 | |||
2f893e185c | |||
144f53f534 | |||
0307a32b55 | |||
4d6b7dfa61 | |||
972f0149f2 | |||
d23f980d75 | |||
49705fd839 | |||
b34b292547 | |||
f5a5916b35 | |||
28684889c8 | |||
5864256026 | |||
56e370b342 | |||
acb4f0e9bf | |||
cde8f7e11f | |||
0cd5621572 | |||
239c3864fe | |||
ae5c8dcc4d | |||
62d41cb488 | |||
d75003136c | |||
291c3ee610 | |||
9e848e173c | |||
f17f79c796 | |||
5ca7d128e6 | |||
7738cb40f6 | |||
43e369c6d5 | |||
3b5f843e92 | |||
624f88c6c0 | |||
7e148208c4 | |||
58b52b0dd1 | |||
35f2177d66 | |||
057a7996d0 | |||
d6c6cf6f5f | |||
82b2e20fbf | |||
7b49d39676 | |||
69fe256333 | |||
Aires | 2575b7552f | ||
Aires | 927057e56e | ||
8251761f93 | |||
9e06031346 | |||
1e3c2a85da | |||
806e9d4a93 | |||
d664fb04de | |||
a44ddc27b1 | |||
03e1d2d584 | |||
413452614f | |||
9a20e17a73 | |||
6d24140f51 | |||
2e7d6c5680 | |||
Aires | d789d9a2de | ||
Aires | 1af5ef1546 | ||
Aires | 7caa5b2a35 | ||
449b3abafa | |||
d946893c3b | |||
Aires | 888d915fe8 | ||
Aires | 816528f00e | ||
33026a05f4 | |||
cedb27beb1 | |||
Aires | 80736f76de | ||
Aires | 704f05a3c8 | ||
Aires | a1dc5cd106 | ||
Aires | 2e28b5160b |
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
@ -7,11 +7,15 @@ on:
|
|||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# when updating channels, also update .mergify.yml
|
||||
channel: [ nixos-unstable, nixos-24.05 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@V27
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
nix_path: nixpkgs=channel:${{ matrix.channel }}
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||
- run: ./tests/run.py
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
queue_rules:
|
||||
- name: default
|
||||
merge_conditions:
|
||||
- check-success=tests
|
||||
- check-success=tests (nixos-24.05)
|
||||
- check-success=tests (nixos-unstable)
|
||||
defaults:
|
||||
actions:
|
||||
queue:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
beagleboard/pocketbeagle @yegortimoshenko
|
||||
dell/xps/13-9370 @moredread
|
||||
dell/xps/13-9380 @kalbasit
|
||||
dell/xps/15-9560 @Lyndeno
|
||||
lenovo/thinkpad/x230 @makefu @yegortimoshenko
|
||||
lenovo/thinkpad/x250 @Mic92
|
||||
pcengines/apu @yegortimoshenko
|
||||
|
@ -11,3 +12,4 @@ purism/librem/13v3 @yegortimoshenko
|
|||
system76/darp6 @khumba
|
||||
framework @emiller88
|
||||
tuxedo/pulse/15/gen2 @trueNAHO
|
||||
tuxedo/pulse/14/gen3 @gabyx @britter @trueNAHO
|
||||
|
|
24
README.md
24
README.md
|
@ -65,6 +65,10 @@ you can easily pin to a particular revision if you desire more stability.
|
|||
|
||||
See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
||||
|
||||
## Get in touch
|
||||
|
||||
For questions and discussions, come join us in the [nixos-anywhere matrix](https://matrix.to/#/#nixos-hardware:nixos.org) room.
|
||||
|
||||
## List of Profiles
|
||||
|
||||
See code for all available configurations.
|
||||
|
@ -85,7 +89,9 @@ See code for all available configurations.
|
|||
| [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 Strix G513IM](asus/rog-strix/g513im) | `<nixos-hardware/asus/rog-strix/g513im>` |
|
||||
| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `<nixos-hardware/asus/rog-strix/g713ie>` |
|
||||
| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `<nixos-hardware/asus/rog-strix/g733qs>` |
|
||||
| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `<nixos-hardware/asus/rog-strix/x570e>` |
|
||||
| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `<nixos-hardware/asus/zephyrus/ga401>` |
|
||||
| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `<nixos-hardware/asus/zephyrus/ga402>` |
|
||||
| [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/amdgpu) | `<nixos-hardware/asus/zephyrus/ga402x/amdgpu>` |
|
||||
|
@ -94,9 +100,12 @@ See code for all available configurations.
|
|||
| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `<nixos-hardware/asus/zephyrus/ga503>` |
|
||||
| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `<nixos-hardware/asus/zephyrus/gu603h>` |
|
||||
| [Asus TUF FX504GD](asus/fx504gd) | `<nixos-hardware/asus/fx504gd>` |
|
||||
| [Asus TUF FX506HM](asus/fx506hm) | `<nixos-hardware/asus/fx506hm>` |
|
||||
| [Asus TUF FA507RM](asus/fa507rm) | `<nixos-hardware/asus/fa507rm>` |
|
||||
| [Asus TUF FA507NV](asus/fa507nv) | `<nixos-hardware/asus/fa507nv>` |
|
||||
| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `<nixos-hardware/asus/zenbook/ux371>` |
|
||||
| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `<nixos-hardware/beagleboard/pocketbeagle>` |
|
||||
| [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>` |
|
||||
|
@ -110,6 +119,8 @@ See code for all available configurations.
|
|||
| [Dell Latitude 7390](dell/latitude/7390) | `<nixos-hardware/dell/latitude/7390>` |
|
||||
| [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 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>` |
|
||||
| [Dell Precision 5530](dell/precision/5530) | `<nixos-hardware/dell/precision/5530>` |
|
||||
|
@ -164,12 +175,17 @@ See code for all available configurations.
|
|||
| [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>` |
|
||||
| [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>` |
|
||||
| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `<nixos-hardware/lenovo/ideapad/15alc6>` |
|
||||
| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `<nixos-hardware/lenovo/ideapad/15arh05>` |
|
||||
| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `<nixos-hardware/lenovo/ideapad/15ach6>` |
|
||||
| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `<nixos-hardware/lenovo/ideapad/16ach6>` |
|
||||
| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `<nixos-hardware/lenovo/ideapad/z510>` |
|
||||
| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `<nixos-hardware/lenovo/ideapad/slim-5>` |
|
||||
| [Lenovo IdeaPad S145 15api](lenovo/ideapad/s145-15api) | `<nixos-hardware/lenovo/ideapad/s145-15api>` |
|
||||
| [Lenovo Legion 5 15ach6h](lenovo/legion/15ach6h) | `<nixos-hardware/lenovo/legion/15ach6h>` |
|
||||
| [Lenovo Legion 5 15arh05h](lenovo/legion/15arh05h) | `<nixos-hardware/lenovo/legion/15arh05h>` |
|
||||
| [Lenovo Legion 7 Slim 15ach6](lenovo/legion/15ach6) | `<nixos-hardware/lenovo/legion/15ach6>` |
|
||||
| [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `<nixos-hardware/lenovo/legion/16ach6h>` |
|
||||
|
@ -208,6 +224,7 @@ See code for all available configurations.
|
|||
| [Lenovo ThinkPad T14 AMD Gen 4](lenovo/thinkpad/t14/amd/gen4) | `<nixos-hardware/lenovo/thinkpad/t14/amd/gen4>` |
|
||||
| [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `<nixos-hardware/lenovo/thinkpad/t14>` |
|
||||
| [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/t14s/amd/gen1>` |
|
||||
| [Lenovo ThinkPad T14s AMD Gen 4](lenovo/thinkpad/t14s/amd/gen4) | `<nixos-hardware/lenovo/thinkpad/t14s/amd/gen4>` |
|
||||
| [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `<nixos-hardware/lenovo/thinkpad/t14s>` |
|
||||
| [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `<nixos-hardware/lenovo/thinkpad/t410>` |
|
||||
| [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `<nixos-hardware/lenovo/thinkpad/t420>` |
|
||||
|
@ -234,6 +251,7 @@ See code for all available configurations.
|
|||
| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/9th-gen>` |
|
||||
| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/10th-gen>` |
|
||||
| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/11th-gen>` |
|
||||
| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/12th-gen>` |
|
||||
| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `<nixos-hardware/lenovo/thinkpad/x1-extreme/gen2>` |
|
||||
| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `<nixos-hardware/lenovo/thinkpad/x1-extreme/gen4>` |
|
||||
| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `<nixos-hardware/lenovo/thinkpad/x1-nano/gen1>` |
|
||||
|
@ -267,14 +285,16 @@ See code for all available configurations.
|
|||
| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd) | `<nixos-hardware/microsoft/surface/surface-laptop-amd>` |
|
||||
| [Microsoft Surface Range (Common Modules)](microsoft/surface/common) | `<nixos-hardware/microsoft/surface/common>` |
|
||||
| [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `<nixos-hardware/microsoft/surface-pro/3>` |
|
||||
| [Microsoft Surface Pro 9](microsoft/surface-pro/9) | `<nixos-hardware/microsoft/surface-pro/9>` |
|
||||
| [Morefine M600](morefine/m600) | `<nixos-hardware/morefine/m600>` |
|
||||
| [NXP iMX8 MPlus Evaluation Kit](nxp/imx8mp-evk) | `<nixos-hardware/nxp/imx8mp-evk>` |
|
||||
| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `<nixos-hardware/nxp/imx8mq-evk>` |
|
||||
| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `<nixos-hardware/hardkernel/odroid-hc4>` |
|
||||
| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `<nixos-hardware/hardkernel/odroid-h3>` |
|
||||
| [Omen 15-en0010ca](omen/14-fb0798ng) | `<nixos-hardware/omen/14-fb0798ng>` |
|
||||
| [Omen 14-fb0798ng](omen/14-fb0798ng) | `<nixos-hardware/omen/14-fb0798ng>` |
|
||||
| [Omen 15-en0010ca](omen/15-en0010ca) | `<nixos-hardware/omen/15-en0010ca>` |
|
||||
| [Omen 16-n0005ne](omen/16-n0005ne) | `<nixos-hardware/omen/16-n0005ne>` |
|
||||
| [Omen 16-n0280nd](/omen/16-n0280nd) | `<nixos-hardware/omen/16-n0280nd>` |
|
||||
| [Omen 15-en1007sa](omen/15-en1007sa) | `<nixos-hardware/omen/15-en1007sa>` |
|
||||
| [Omen 15-en0002np](omen/15-en0002np) | `<nixos-hardware/omen/15-en0002np>` |
|
||||
| [One-Netbook OneNetbook 4](onenetbook/4) | `<nixos-hardware/onenetbook/4>` |
|
||||
|
@ -288,6 +308,7 @@ See code for all available configurations.
|
|||
| [Purism Librem 15v3](purism/librem/13v3) | `<nixos-hardware/purism/librem/15v3>` |
|
||||
| [Purism Librem 5r4](purism/librem/5r4) | `<nixos-hardware/purism/librem/5r4>` |
|
||||
| [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>` |
|
||||
| [Raspberry Pi 5](raspberry-pi/5) | `<nixos-hardware/raspberry-pi/5>` |
|
||||
| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `<nixos-hardware/samsung/np900x3c>` |
|
||||
|
@ -299,6 +320,7 @@ See code for all available configurations.
|
|||
| [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `<nixos-hardware/supermicro/x12scz-tln4f>` |
|
||||
| [System76 (generic)](system76) | `<nixos-hardware/system76>` |
|
||||
| [System76 Darter Pro 6](system76/darp6) | `<nixos-hardware/system76/darp6>` |
|
||||
| [System76 Gazelle Gaze18](system76/gaze18) | `<nixos-hardware/system76/gaze18>` |
|
||||
| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `<nixos-hardware/toshiba/swanky>` |
|
||||
| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `<nixos-hardware/tuxedo/infinitybook/v4>` |
|
||||
| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `<nixos-hardware/tuxedo/infinitybook/pro14/gen7>` |
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
# TODO: reverse compat
|
||||
hardware.opengl.driSupport = false;
|
||||
|
||||
# TODO: reverse compat
|
||||
services.xserver = {
|
||||
defaultDepth = lib.mkDefault 24;
|
||||
|
|
26
apple/imac/18-2/README.md
Normal file
26
apple/imac/18-2/README.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# iMac 18,2, NixOS 24.05 (2024)
|
||||
|
||||
## Audio
|
||||
- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322968 lands in master
|
||||
|
||||
## Bluetooth
|
||||
- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322964 lands in master
|
||||
|
||||
## Thunderbolt
|
||||
- [x] ok
|
||||
|
||||
## SATA
|
||||
- [x] ok
|
||||
|
||||
## NVME
|
||||
- [x] ok, older NVME / Controller may need workaround for resume
|
||||
|
||||
## Suspend/Resumer
|
||||
- [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes).
|
||||
|
||||
## Wifi
|
||||
- [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015)
|
||||
|
||||
## Resources (Intel iMac/MacBook share similar custom hardware)
|
||||
- https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file
|
||||
- https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7
|
30
apple/imac/18-2/default.nix
Normal file
30
apple/imac/18-2/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel
|
||||
../../../common/gpu/amd
|
||||
../../../common/hidpi.nix
|
||||
../../../common/pc/laptop/ssd
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
# apple smc (TODO: check spi)
|
||||
boot = {
|
||||
initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ];
|
||||
kernelParams = [ "intel_iommu=on" ];
|
||||
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
# Wifi, CPU Microcode FW updates
|
||||
networking.enableB43Firmware = lib.mkDefault true;
|
||||
hardware = {
|
||||
enableRedistributableFirmware = lib.mkDefault true;
|
||||
cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||
};
|
||||
}
|
8
apple/imac/default.nix
Normal file
8
apple/imac/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../common/cpu/intel
|
||||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
];
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/gpu/intel/sandy-bridge
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop/ssd
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
# TODO: reverse compat
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.graphics.enable32Bit = lib.mkDefault true;
|
||||
|
||||
services.xserver = {
|
||||
# TODO: we should not enable unfree drivers
|
||||
|
|
|
@ -1,17 +1,26 @@
|
|||
# MacBook Pro 14,1
|
||||
# MacBook Pro 14,1, NixOS 24.05 (2024)
|
||||
|
||||
## Audio
|
||||
|
||||
Audio is a lost cause. Bribe an Apple or Cirrus engineer for the datasheet. ;)
|
||||
|
||||
## Thunderbolt
|
||||
|
||||
The thunderbolt module will oops upon system resume, and subsequently refuse to work until next reboot.
|
||||
|
||||
## Suspend/Resume
|
||||
|
||||
The d3cold state needs to be disabled on the NVME controller for it to wake up.
|
||||
- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322968 lands in master
|
||||
|
||||
## Bluetooth
|
||||
The Bluetooth UART (/dev/ttyS0) is created and then deleted by udev in early boot.
|
||||
Hack around it by reloading the 8250_dw module, causing it to be re-created.
|
||||
- [ ] broken lands https://github.com/NixOS/nixpkgs/pull/322964 in master
|
||||
|
||||
## Touchpad
|
||||
- [x] Working, including 'disable while typing' usable quirk
|
||||
|
||||
## Thunderbolt
|
||||
- [x] Working
|
||||
|
||||
## NVME
|
||||
- [x] Working, older NVME / Controller may need workaround for resume
|
||||
|
||||
## Suspend/Resume
|
||||
- [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes).
|
||||
|
||||
## Wifi
|
||||
- [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015)
|
||||
|
||||
## Resources
|
||||
- https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file
|
||||
- https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
##
|
||||
# For some reason /dev/ttyS0 is created, and then removed by udev. We need this
|
||||
# for bluetooth, and the only way to get it again is to reload 8502_dw. Do so.
|
||||
##
|
||||
|
||||
|
||||
##
|
||||
# /sys/devices/pci0000:00/0000:00:1e.0/driver -> intel-lpss
|
||||
# /sys/bus/pci/devices/0000:00:1e.0
|
||||
# /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:8a/BCM2E7C:00
|
||||
##
|
||||
|
||||
# udevadm info --query=all --path=/sys/bus/serial/devices/serial0-0
|
||||
# P: /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0
|
||||
# M: serial0-0
|
||||
# R: 0
|
||||
# U: serial
|
||||
# E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0
|
||||
# E: SUBSYSTEM=serial
|
||||
# E: MODALIAS=acpi:BCM2E7C:APPLE-UART-BLTH:
|
||||
# E: USEC_INITIALIZED=12406199
|
||||
# E: PATH=/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/bin:/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/sbin
|
||||
# E: ID_VENDOR_FROM_DATABASE=Broadcom
|
||||
|
||||
|
||||
if [[ ! -e "/sys/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/tty/ttyS0" ]]; then
|
||||
if [[ -e /sys/module/8250_dw ]]; then
|
||||
rmmod 8250_dw
|
||||
fi
|
||||
|
||||
modprobe 8250_dw
|
||||
fi
|
||||
|
||||
exec btattach --protocol=h4 --bredr=/dev/ttyS0 --speed=3000000
|
|
@ -1,51 +1,65 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../.
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/gpu/intel
|
||||
../../../common/hidpi.nix
|
||||
../../../common/pc/laptop/ssd
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
##
|
||||
# Make the keyboard work in stage1
|
||||
# Make the keyboard work in stage1, enable iommu
|
||||
# https://www.kernelconfig.io/config_keyboard_applespi
|
||||
##
|
||||
boot.initrd.kernelModules = [ "applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ];
|
||||
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
|
||||
boot = {
|
||||
initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ];
|
||||
kernelParams = [ "intel_iommu=on" ];
|
||||
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
##
|
||||
# Disable d3cold on the NVME controller so the machine can actually
|
||||
# wake up.
|
||||
# Touchpad quirks to make "disable-while-typing" actually work
|
||||
services.libinput.enable = true;
|
||||
environment.etc."libinput/local-overrides.quirks".text = ''
|
||||
[MacBook(Pro) SPI Touchpads]
|
||||
MatchName=*Apple SPI Touchpad*
|
||||
ModelAppleTouchpad=1
|
||||
AttrTouchSizeRange=200:150
|
||||
AttrPalmSizeThreshold=1100
|
||||
|
||||
[MacBook(Pro) SPI Keyboards]
|
||||
MatchName=*Apple SPI Keyboard*
|
||||
AttrKeyboardIntegration=internal
|
||||
|
||||
[MacBookPro Touchbar]
|
||||
MatchBus=usb
|
||||
MatchVendor=0x05AC
|
||||
MatchProduct=0x8600
|
||||
AttrKeyboardIntegration=internal
|
||||
'';
|
||||
|
||||
# Wifi, CPU Microcode FW updates
|
||||
networking.enableB43Firmware = lib.mkDefault true;
|
||||
hardware = {
|
||||
enableRedistributableFirmware = lib.mkDefault true;
|
||||
cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||
};
|
||||
|
||||
# [Enable only if needed!]
|
||||
# Disable d3cold on older NVME controller, only if needed
|
||||
# https://github.com/Dunedan/mbp-2016-linux
|
||||
##
|
||||
systemd.services.disable-nvme-d3cold = {
|
||||
description = "Disables d3cold on the NVME controller";
|
||||
before = [ "suspend.target" ];
|
||||
path = [ pkgs.bash pkgs.coreutils ];
|
||||
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = "${./disable-nvme-d3cold.sh}";
|
||||
serviceConfig.TimeoutSec = 0;
|
||||
|
||||
wantedBy = [ "multi-user.target" "suspend.target" ];
|
||||
};
|
||||
|
||||
##
|
||||
# For some reason /dev/ttyS0 is created, and then removed by udev. We need this
|
||||
# for bluetooth, and the only way to get it again is to reload 8502_dw. Luckily,
|
||||
# nothing else uses it.
|
||||
##
|
||||
systemd.services.btattach-bcm2e7c = lib.mkIf config.hardware.bluetooth.enable {
|
||||
before = [ "bluetooth.target" ];
|
||||
|
||||
# Hacky, as it's a different device, but this always comes after ttyS0
|
||||
after = [ "sys-devices-platform-serial8250-tty-ttyS1.device" ];
|
||||
path = [ pkgs.bash pkgs.kmod pkgs.bluez ];
|
||||
|
||||
serviceConfig.Type = "simple";
|
||||
serviceConfig.ExecStart = "${./btfix.sh}";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
#
|
||||
#systemd.services.disable-nvme-d3cold = {
|
||||
# description = "Disables d3cold on the NVME controller";
|
||||
# before = [ "suspend.target" ];
|
||||
# path = [ pkgs.bash pkgs.coreutils ];
|
||||
# serviceConfig.Type = "oneshot";
|
||||
# serviceConfig.ExecStart = "${./disable-nvme-d3cold.sh}";
|
||||
# serviceConfig.TimeoutSec = 0;
|
||||
# wantedBy = [ "multi-user.target" "suspend.target" ];
|
||||
#};
|
||||
}
|
||||
|
|
|
@ -8,21 +8,23 @@ in
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = mkDefault true;
|
||||
driSupport = mkDefault true;
|
||||
driSupport32Bit = mkDefault true;
|
||||
};
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = mkDefault true;
|
||||
enable32Bit = mkDefault true;
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = mkDefault true;
|
||||
powerManagement.enable = mkDefault false;
|
||||
powerManagement.finegrained = mkDefault false;
|
||||
open = mkDefault false;
|
||||
nvidiaSettings = mkDefault true;
|
||||
nvidia = {
|
||||
modesetting.enable = mkDefault true;
|
||||
powerManagement.enable = mkDefault false;
|
||||
powerManagement.finegrained = mkDefault false;
|
||||
open = mkDefault false;
|
||||
nvidiaSettings = mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,15 +2,20 @@
|
|||
, ... } @ args:
|
||||
|
||||
let
|
||||
version = "6.10.3";
|
||||
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
||||
|
||||
patchRepo = fetchFromGitHub {
|
||||
owner = "t2linux";
|
||||
repo = "linux-t2-patches";
|
||||
rev = "8b0e51ea87f170c559c9e2f437f85367838c2fad";
|
||||
hash = "sha256-4YFaLW4WTKdFysIJHnshEaqoiKBFegnZiw4Kv88LjIA=";
|
||||
rev = "29d6f013088303623cd9f2c6f5951eb3455830a6";
|
||||
hash = "sha256-V0dakKRPC6Hj1I+SCiZXOCwtS0mZCCAsWnGtJnFlzxU=";
|
||||
};
|
||||
|
||||
version = "6.9";
|
||||
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
||||
kernel = fetchzip {
|
||||
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
||||
hash = "sha256-+tWXv9j5bUJN7kzFZxuL+wB1fBCyXbtyms3Q5/dTtK4=";
|
||||
};
|
||||
in
|
||||
buildLinux (args // {
|
||||
inherit version;
|
||||
|
@ -20,10 +25,7 @@ buildLinux (args // {
|
|||
modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}";
|
||||
|
||||
src = runCommand "patched-source" {} ''
|
||||
cp -r ${fetchzip {
|
||||
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
||||
hash = "sha256-RIxLyvF5kw/to8MjAUq2iQ4X0bGk7FY+ovE3zd0eKxM=";
|
||||
}} $out
|
||||
cp -r ${kernel} $out
|
||||
chmod -R u+w $out
|
||||
cd $out
|
||||
while read -r patch; do
|
||||
|
@ -35,6 +37,7 @@ buildLinux (args // {
|
|||
structuredExtraConfig = with lib.kernel; {
|
||||
APPLE_BCE = module;
|
||||
APPLE_GMUX = module;
|
||||
APFS_FS = module;
|
||||
BRCMFMAC = module;
|
||||
BT_BCM = module;
|
||||
BT_HCIBCM4377 = module;
|
||||
|
@ -44,7 +47,6 @@ buildLinux (args // {
|
|||
HID_APPLETB_KBD = module;
|
||||
HID_APPLE = module;
|
||||
DRM_APPLETBDRM = module;
|
||||
HID_APPLE_MAGIC_BACKLIGHT = module;
|
||||
HID_SENSOR_ALS = module;
|
||||
SND_PCM = module;
|
||||
STAGING = yes;
|
||||
|
|
28
asus/fx506hm/README.md
Normal file
28
asus/fx506hm/README.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!-- vim: set fenc=utf-8 ts=2 sw=2 sts=-1 sr et si tw=0 fdm=marker fmr={{{,}}}: -->
|
||||
# [ASUS TUF Gaming F15 FX506HM (2021)](https://www.asus.com/laptops/for-gaming/tuf-gaming/2021-asus-tuf-gaming-f15/)
|
||||
|
||||
This imports common modules for the Intel CPU and iGPU, Nvidia and PRIME render offloading, basic laptop configs, basic SSD configs and configs for ASUS batteries.
|
||||
|
||||
On top of that, it sets the right PCI bus IDs for the iGPU and dGPU to make PRIME work well and enables modesetting.
|
||||
|
||||
## Useful other things to consider in your configuration
|
||||
### Battery charging limit
|
||||
Due to the common module for ASUS batteries, you can make your battery only charge up to a certain percentage to improve its life. You can place something similar to the following in your configuration to enable it:
|
||||
|
||||
```nix
|
||||
hardware.asus.battery =
|
||||
{
|
||||
chargeUpto = 85; # Maximum level of charge for your battery, as a percentage.
|
||||
enableChargeUptoScript = true; # Whether to add charge-upto to environment.systemPackages. `charge-upto 85` temporarily sets the charge limit to 85%.
|
||||
};
|
||||
```
|
||||
|
||||
### OpenRGB
|
||||
You can use OpenRGB to control the RGB keyboard on this laptop. There's also plugins for it to get some extra RGB lighting modes if you wish. You can place the following in your configuration to enable it:
|
||||
|
||||
```nix
|
||||
boot.kernelModules = [ "i2c-dev" ];
|
||||
hardware.i2c.enable = true;
|
||||
services.udev.packages = [ pkgs.openrgb ];
|
||||
services.hardware.openrgb.enable = true;
|
||||
```
|
25
asus/fx506hm/default.nix
Normal file
25
asus/fx506hm/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../common/cpu/intel
|
||||
../../common/gpu/nvidia
|
||||
../../common/gpu/nvidia/prime.nix
|
||||
../../common/pc/laptop
|
||||
../../common/pc/ssd
|
||||
../battery.nix
|
||||
];
|
||||
|
||||
hardware.nvidia =
|
||||
{
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
open = lib.mkIf (lib.versionAtLeast config.hardware.nvidia.package.version "555") true;
|
||||
|
||||
prime =
|
||||
{
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
}
|
16
asus/rog-strix/g713ie/default.nix
Normal file
16
asus/rog-strix/g713ie/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
imports = [
|
||||
../../../common/cpu/amd
|
||||
../../../common/cpu/amd/pstate.nix
|
||||
../../../common/gpu/nvidia
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/ssd
|
||||
../../battery.nix
|
||||
];
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
amdgpuBusId = "PCI:5:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
}
|
14
asus/rog-strix/x570e/default.nix
Normal file
14
asus/rog-strix/x570e/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Motherboard: ROG STRIX X570-E GAMING
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/amd
|
||||
../../../common/cpu/amd/pstate.nix
|
||||
../../../common/cpu/amd/zenpower.nix
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
|
||||
# Bluetooth driver for Intel AX200 802.11ax
|
||||
boot.kernelModules = [ "btintel" ];
|
||||
}
|
47
asus/zenbook/ux371/README.md
Normal file
47
asus/zenbook/ux371/README.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Asus Zenbook Flip S13
|
||||
|
||||
This is tested on an [UX371](https://www.asus.com/laptops/for-home/zenbook/zenbook-flip-s-ux371-11th-gen-intel/).
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
```bash
|
||||
lspci -nn
|
||||
0000:00:00.0 Host bridge [0600]: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14] (rev 01)
|
||||
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01)
|
||||
0000:00:04.0 Signal processing controller [1180]: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant [8086:9a03] (rev 01)
|
||||
0000:00:07.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #0 [8086:9a23] (rev 01)
|
||||
0000:00:07.1 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #1 [8086:9a25] (rev 01)
|
||||
0000:00:08.0 System peripheral [0880]: Intel Corporation GNA Scoring Accelerator module [8086:9a11] (rev 01)
|
||||
0000:00:0a.0 Signal processing controller [1180]: Intel Corporation Tigerlake Telemetry Aggregator Driver [8086:9a0d] (rev 01)
|
||||
0000:00:0d.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller [8086:9a13] (rev 01)
|
||||
0000:00:0d.2 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 [8086:9a1b] (rev 01)
|
||||
0000:00:0e.0 RAID bus controller [0104]: Intel Corporation Volume Management Device NVMe RAID Controller [8086:9a0b]
|
||||
0000:00:12.0 Serial controller [0700]: Intel Corporation Tiger Lake-LP Integrated Sensor Hub [8086:a0fc] (rev 20)
|
||||
0000:00:14.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller [8086:a0ed] (rev 20)
|
||||
0000:00:14.2 RAM memory [0500]: Intel Corporation Tiger Lake-LP Shared SRAM [8086:a0ef] (rev 20)
|
||||
0000:00:14.3 Network controller [0280]: Intel Corporation Wi-Fi 6 AX201 [8086:a0f0] (rev 20)
|
||||
0000:00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 [8086:a0e8] (rev 20)
|
||||
0000:00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 [8086:a0e9] (rev 20)
|
||||
0000:00:16.0 Communication controller [0780]: Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0] (rev 20)
|
||||
0000:00:1d.0 System peripheral [0880]: Intel Corporation RST VMD Managed Controller [8086:09ab]
|
||||
0000:00:1f.0 ISA bridge [0601]: Intel Corporation Tiger Lake-LP LPC Controller [8086:a082] (rev 20)
|
||||
0000:00:1f.3 Multimedia audio controller [0401]: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8] (rev 20)
|
||||
0000:00:1f.4 SMBus [0c05]: Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3] (rev 20)
|
||||
0000:00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller [8086:a0a4] (rev 20)
|
||||
10000:e0:1d.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 [8086:a0b0] (rev 20)
|
||||
10000:e1:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD Black SN750 / PC SN730 / Red SN700 NVMe SSD [15b7:5006]
|
||||
```
|
||||
|
||||
## Updating Firmware
|
||||
|
||||
First enable `fwupd` in your config
|
||||
|
||||
```nix
|
||||
services.fwupd.enable = true;
|
||||
```
|
||||
|
||||
Then run
|
||||
|
||||
```bash
|
||||
$ fwupdmgr update
|
||||
```
|
24
asus/zenbook/ux371/default.nix
Normal file
24
asus/zenbook/ux371/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../../../common/gpu/intel/tiger-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
../../battery.nix
|
||||
];
|
||||
|
||||
boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "xe") [
|
||||
"i915.force_probe=!9a49"
|
||||
"xe.force_probe=9a49"
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
16
asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md
Normal file
16
asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Deprecation of //asus/zephyrus/ga402x/default.nix
|
||||
|
||||
Background:
|
||||
The `asus-zephyrus-ga402x` provides an attr-set with `amdgpu` and `nvidia` entries, to allow users
|
||||
to choose whether to enable only the AMD-GPU driver, or also enable the NVidia driver with (by
|
||||
default) Prime enabled.
|
||||
|
||||
However, this attr-set style seems to be broken by [PR #1046](https://github.com/NixOS/nixos-hardware/pull/1046),
|
||||
which exports modules as paths, instead.
|
||||
That change seems to cause an error of "value is a path while a set was expected".
|
||||
|
||||
[PR #1053](https://github.com/NixOS/nixos-hardware/pull/1053):
|
||||
- Replaced `asus-zephyrus-ga402x.amdgpu` with a `asus-zephyrus-ga402x-amdgpu` entry.
|
||||
- Replaced `asus-zephyrus-ga402x.nvidia` with a `asus-zephyrus-ga402x-nvidia` entry.
|
||||
- Made `asus-zephyrus-ga402x` throw a deprecation error.
|
||||
- [FIXES: #1052](https://github.com/NixOS/nixos-hardware/issues/1052)
|
|
@ -1,11 +1,10 @@
|
|||
{ config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault mkEnableOption mkIf mkMerge;
|
||||
inherit (lib) mkEnableOption mkIf mkMerge;
|
||||
cfg = config.hardware.asus.zephyrus.ga402x;
|
||||
|
||||
in {
|
||||
|
@ -20,19 +19,6 @@ in {
|
|||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
# AMD RX680
|
||||
services.xserver.videoDrivers = mkDefault [ "amdgpu" ];
|
||||
|
||||
hardware = {
|
||||
amdgpu.loadInInitrd = true;
|
||||
opengl.extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf cfg.amdgpu.recovery.enable {
|
||||
# Hopefully fixes for where the kernel sometimes hangs when suspending or hibernating
|
||||
# (Though, I'm very suspicious of the Mediatek Wifi...)
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
## When using from a Flake, you can access these via imports of the attr key, e.g:
|
||||
#
|
||||
# imports = [
|
||||
# nixos-hardware.nixosModules.asus-zephyrus-ga402x.amdgpu
|
||||
# ];
|
||||
#
|
||||
## or:
|
||||
# imports = [
|
||||
# nixos-hardware.nixosModules.asus-zephyrus-ga402x.nvidia
|
||||
# ];
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
amdgpu = import ./amdgpu;
|
||||
nvidia = import ./nvidia;
|
||||
assertions = [
|
||||
{
|
||||
assertion = false;
|
||||
message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md for more details";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ in {
|
|||
## "prime.nix" loads this, aleady:
|
||||
# ../../../common/gpu/nvidia
|
||||
../../../../common/gpu/nvidia/prime.nix
|
||||
|
||||
];
|
||||
|
||||
# NVIDIA GeForce RTX 4060 Mobile
|
||||
|
@ -25,12 +26,7 @@ in {
|
|||
|
||||
hardware = {
|
||||
## Enable the Nvidia card, as well as Prime and Offload:
|
||||
amdgpu.loadInInitrd = true;
|
||||
opengl.extraPackages = with pkgs; [
|
||||
# Also in nvidia/default.nix
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
amdgpu.initrd.enable = lib.mkDefault true;
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault mkIf mkMerge version versionOlder;
|
||||
inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder;
|
||||
|
||||
cfg = config.hardware.asus.zephyrus.ga402x;
|
||||
defaultAutosuspendEnable = versionAtLeast config.boot.kernelPackages.kernel.version "6.9";
|
||||
|
||||
in {
|
||||
|
||||
imports = [
|
||||
|
@ -18,6 +22,18 @@ in {
|
|||
../../../common/pc/ssd
|
||||
];
|
||||
|
||||
options.hardware.asus.zephyrus.ga402x = {
|
||||
# Kernels earlier than 6.9 (possibly even earlier) tend to take 1-2 key-presses
|
||||
# to wake-up the internal keyboard after the device is suspended.
|
||||
# Therefore, this option disables auto-suspend for the keyboard by default, but
|
||||
# enables it for kernel 6.9.x onwards.
|
||||
#
|
||||
# Note: the device name is "ASUS N-KEY Device".
|
||||
keyboard.autosuspend.enable = (
|
||||
mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X"
|
||||
) // { default = defaultAutosuspendEnable; };
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
# Configure basic system settings:
|
||||
|
@ -43,9 +59,9 @@ in {
|
|||
evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
|
||||
KEYBOARD_KEY_ff31007c=f20
|
||||
'';
|
||||
extraRules = ''
|
||||
extraRules = mkIf (! cfg.keyboard.autosuspend.enable) ''
|
||||
# Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard
|
||||
# Otherwise, it will tend to take 1-2 key-presses to wake-up after suspending
|
||||
# Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends
|
||||
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1"
|
||||
'';
|
||||
};
|
||||
|
|
11
chuwi/minibook-x/default.nix
Normal file
11
chuwi/minibook-x/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
../../common/cpu/intel
|
||||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/hidpi.nix
|
||||
];
|
||||
# Fixes the display being rotated 90 degrees.
|
||||
boot.kernelParams =
|
||||
[ "fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up" ];
|
||||
}
|
|
@ -1,9 +1,15 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old
|
||||
# Disables scatter/gather which was introduced with kernel version 6.2
|
||||
# It produces completely white or flashing screens when enabled while using the iGPU of Ryzen 7000-series CPUs (Raphael)
|
||||
# This issue is not seen in kernel 6.6 or newer versions
|
||||
|
||||
imports = [ ../. ];
|
||||
|
||||
|
@ -12,8 +18,9 @@
|
|||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
})
|
||||
|
||||
(lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") {
|
||||
kernelParams = ["amdgpu.sg_display=0"];
|
||||
})
|
||||
(lib.mkIf (
|
||||
(lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2")
|
||||
&& (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6")
|
||||
) { kernelParams = [ "amdgpu.sg_display=0" ]; })
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
15
common/gpu/24.05-compat.nix
Normal file
15
common/gpu/24.05-compat.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Backward-compat for 24.05, can be removed after we drop 24.05 support
|
||||
imports = lib.optionals (lib.versionOlder lib.version "24.11pre") [
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable" ] [ "hardware" "opengl" "enable" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ])
|
||||
];
|
||||
}
|
|
@ -1,46 +1,15 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options.hardware.amdgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc
|
||||
"loading `amdgpu` kernelModule at stage 1. (Add `amdgpu` to `boot.initrd.kernelModules`)"
|
||||
) // {
|
||||
default = true;
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
config = {
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
};
|
||||
|
||||
hardware.amdgpu.initrd.enable = lib.mkDefault true;
|
||||
};
|
||||
options.hardware.amdgpu.amdvlk = lib.mkEnableOption (lib.mdDoc
|
||||
"use amdvlk drivers instead mesa radv drivers"
|
||||
);
|
||||
options.hardware.amdgpu.opencl = lib.mkEnableOption (lib.mdDoc
|
||||
"rocm opencl runtime (Install rocmPackages.clr and rocmPackages.clr.icd)"
|
||||
) // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
||||
|
||||
hardware.opengl = {
|
||||
driSupport = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.hardware.amdgpu.loadInInitrd {
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
})
|
||||
(lib.mkIf config.hardware.amdgpu.amdvlk {
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
|
||||
hardware.opengl.extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
})
|
||||
(lib.mkIf config.hardware.amdgpu.opencl {
|
||||
hardware.opengl.extraPackages =
|
||||
if pkgs ? rocmPackages.clr
|
||||
then with pkgs.rocmPackages; [ clr clr.icd ]
|
||||
else with pkgs; [ rocm-opencl-icd rocm-opencl-runtime ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
imports = [ ./intel ];
|
||||
|
||||
warnings = [
|
||||
''
|
||||
DEPRECATED: The <nixos-hardware/common/gpu/intel.nix> module has been deprecated.
|
||||
|
||||
Switch to using <nixos-hardware/common/gpu/intel> instead.
|
||||
''
|
||||
];
|
||||
}
|
|
@ -1,32 +1,62 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.hardware.intelgpu.loadInInitrd = lib.mkEnableOption (lib.mdDoc
|
||||
"loading `i195` kernelModule at stage 1. (Add `i915` to `boot.initrd.kernelModules`)"
|
||||
) // {
|
||||
default = true;
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
options.hardware.intelgpu.driver = lib.mkOption {
|
||||
description = "Intel GPU driver to use";
|
||||
type = lib.types.enum [
|
||||
"i915"
|
||||
"xe"
|
||||
];
|
||||
default = "i915";
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.hardware.intelgpu.loadInInitrd {
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
})
|
||||
{
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
||||
};
|
||||
options.hardware.intelgpu.loadInInitrd =
|
||||
lib.mkEnableOption
|
||||
"Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)"
|
||||
// {
|
||||
default = true;
|
||||
};
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
];
|
||||
config = {
|
||||
boot.initrd.kernelModules = [ config.hardware.intelgpu.driver ];
|
||||
|
||||
hardware.opengl.extraPackages32 = with pkgs.driversi686Linux; [
|
||||
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
];
|
||||
}
|
||||
];
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
|
||||
};
|
||||
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
(
|
||||
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
|
||||
vaapiIntel
|
||||
else
|
||||
intel-vaapi-driver
|
||||
)
|
||||
intel-media-driver
|
||||
];
|
||||
|
||||
hardware.graphics.extraPackages32 = with pkgs.driversi686Linux; [
|
||||
(
|
||||
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then
|
||||
vaapiIntel
|
||||
else
|
||||
intel-vaapi-driver
|
||||
)
|
||||
intel-media-driver
|
||||
];
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = (
|
||||
config.hardware.intelgpu.driver != "xe"
|
||||
|| lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8"
|
||||
);
|
||||
message = "Intel Xe GPU driver is not supported on kernels earlier than 6.8. Update or use the i915 driver.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
12
common/gpu/intel/tiger-lake/default.nix
Normal file
12
common/gpu/intel/tiger-lake/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ../. ];
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") {
|
||||
hardware.intelgpu.driver = "xe";
|
||||
})
|
||||
(lib.mkIf (config.hardware.intelgpu.driver == "i915") {
|
||||
boot.kernelParams = [ "i915.enable_guc=3" ];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
imports = [ ./nvidia/disable.nix ];
|
||||
|
||||
warnings = [
|
||||
''
|
||||
DEPRECATED: The <nixos-hardware/common/gpu/nvidia-disable.nix> module has been deprecated.
|
||||
|
||||
Switch to using <nixos-hardware/common/gpu/nvidia/disable.nix> instead.
|
||||
''
|
||||
];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
imports = [ ./nvidia/prime.nix ];
|
||||
|
||||
warnings = [
|
||||
''
|
||||
DEPRECATED: The <nixos-hardware/common/gpu/nvidia.nix> module has been deprecated.
|
||||
|
||||
Switch to using <nixos-hardware/common/gpu/nvidia/prime.nix> instead if you use prime offloading.
|
||||
If you are using this without prime, consider switching to <nixos-hardware/common/gpu/nvidia> instead.
|
||||
''
|
||||
];
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../24.05-compat.nix ];
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
];
|
||||
# TODO: this will be a default after https://github.com/NixOS/nixpkgs/pull/326369
|
||||
hardware.nvidia.modesetting.enable = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
# This option is removed from NixOS 23.05 and up
|
||||
nixosVersion = lib.versions.majorMinor lib.version;
|
||||
config = if lib.versionOlder nixosVersion "23.05" then {
|
||||
hardware.video.hidpi.enable = lib.mkDefault true;
|
||||
} else {
|
||||
# Just set the console font, don't mess with the font settings
|
||||
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
||||
console.earlySetup = lib.mkDefault true;
|
||||
};
|
||||
in config
|
||||
{
|
||||
# Just set the console font, don't mess with the font settings
|
||||
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
||||
console.earlySetup = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
{}
|
||||
{
|
||||
warnings = [
|
||||
''
|
||||
DEPRECATED: The <nixos-hardware/common/hdd.nix> module has been deprecated.
|
||||
|
||||
This module has no effect and will be removed in a future release.
|
||||
''
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../../hdd ];
|
||||
|
||||
# Hard disk protection if the laptop falls:
|
||||
services.hdapsd.enable = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/gpu/intel
|
||||
../../../common/gpu/intel/tiger-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
|
@ -14,8 +13,8 @@
|
|||
services.thermald.enable = lib.mkDefault true;
|
||||
|
||||
# Touchpad
|
||||
services.xserver = {
|
||||
libinput.touchpad.tapping = true;
|
||||
libinput.touchpad.tappingDragLock = true;
|
||||
services.libinput.touchpad = {
|
||||
tapping = true;
|
||||
tappingDragLock = true;
|
||||
};
|
||||
}
|
||||
|
|
19
dell/latitude/9430/default.nix
Normal file
19
dell/latitude/9430/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
# See https://discourse.nixos.org/t/i915-driver-has-bug-for-iris-xe-graphics/25006/12
|
||||
# jheidbrink reports that without this setting there is a very high lag in Sway which makes it unusable
|
||||
"i915.enable_psr=0"
|
||||
];
|
||||
|
||||
# Make the webcam work (needs Linux >= 6.6):
|
||||
hardware.ipu6.enable = true;
|
||||
hardware.ipu6.platform = "ipu6ep";
|
||||
}
|
7
dell/optiplex/3050/default.nix
Normal file
7
dell/optiplex/3050/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
../../../common/gpu/nvidia
|
||||
|
@ -21,25 +19,26 @@
|
|||
};
|
||||
boot.kernelParams = ["i915.modeset=1"];
|
||||
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
|
||||
nvidiaSettings = lib.mkDefault true;
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
open = lib.mkDefault false;
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
};
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
|
||||
nvidiaSettings = lib.mkDefault true;
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
open = lib.mkDefault false;
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
};
|
||||
hardware.opengl = {
|
||||
enable = lib.mkDefault true;
|
||||
driSupport = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
};
|
||||
|
||||
# Override the intel gpu driver setting imported above
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkOverride 990 "nvidia");
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkOverride 990 "nvidia");
|
||||
};
|
||||
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
];
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
services.switcherooControl.enable = lib.mkDefault true;
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
|
||||
};
|
||||
nvidia = {
|
||||
prime = {
|
||||
# Bus ID of the Intel GPU.
|
||||
|
@ -20,10 +25,5 @@
|
|||
finegrained = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
opengl = {
|
||||
enable = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,39 +1,21 @@
|
|||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
./xps-common.nix
|
||||
|
||||
# FIXME: remove this when bumblebee works again
|
||||
../../../common/gpu/nvidia/disable.nix
|
||||
../../../common/gpu/nvidia
|
||||
];
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
/* Bumblebee seems to fail to evaluate:
|
||||
(stack trace truncated; use '--show-trace' to show the full trace)
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
error: assertion '(useSettings -> (! libsOnly))' failed
|
||||
hardware.nvidia.prime = {
|
||||
# integrated
|
||||
intelBusId = "PCI:0:2:0";
|
||||
|
||||
at /home/joerg/git/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix:61:1:
|
||||
|
||||
60|
|
||||
61| assert useSettings -> !libsOnly;
|
||||
| ^
|
||||
62| assert !libsOnly -> kernel != null;
|
||||
|
||||
# This configuration makes intel default and optionaly applications could run nvidia with optirun.
|
||||
# To Optimize for your use case import intel or nvidia only configuration instead
|
||||
# xps-9560/intel
|
||||
# or
|
||||
# xps-9560/nvidia
|
||||
|
||||
|
||||
##### bumblebee working, needs reboot to take affect and to use it run: optirun "<application>"
|
||||
services.xserver.videoDrivers = [ "intel" "nvidia" ];
|
||||
boot.blacklistedKernelModules = [ "nouveau" "bbswitch" ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
||||
hardware.bumblebee.enable = lib.mkDefault true;
|
||||
hardware.bumblebee.pmMethod = lib.mkDefault "none";
|
||||
*/
|
||||
# dedicated
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
../../../../common/cpu/intel
|
||||
../../../../common/cpu/intel/kaby-lake
|
||||
../../../../common/gpu/intel/kaby-lake
|
||||
../../../../common/pc/laptop
|
||||
../../../../common/gpu/nvidia/disable.nix
|
||||
../xps-common.nix
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
./xps-common.nix
|
||||
];
|
||||
|
|
36
flake.nix
36
flake.nix
|
@ -2,7 +2,10 @@
|
|||
description = "nixos-hardware";
|
||||
|
||||
outputs = _: {
|
||||
nixosModules = {
|
||||
nixosModules = let
|
||||
deprecated = issue: name: value: builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value;
|
||||
import = path: path; # let the module system know what we are exporting
|
||||
in {
|
||||
acer-aspire-4810t = import ./acer/aspire/4810t;
|
||||
airis-n990 = import ./airis/n990;
|
||||
apple-macbook-air-3 = import ./apple/macbook-air/3;
|
||||
|
@ -14,22 +17,30 @@
|
|||
apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1;
|
||||
apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1;
|
||||
apple-macmini-4-1 = import ./apple/macmini/4;
|
||||
apple-imac-18-2 = import ./apple/imac/18-2;
|
||||
apple-t2 = import ./apple/t2;
|
||||
asus-battery = import ./asus/battery.nix;
|
||||
asus-ally-rc71l = import ./asus/ally/rc71l;
|
||||
asus-fx504gd = import ./asus/fx504gd;
|
||||
asus-fx506hm = import ./asus/fx506hm;
|
||||
asus-fa507nv = import ./asus/fa507nv;
|
||||
asus-fa507rm = import ./asus/fa507rm;
|
||||
asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace;
|
||||
asus-rog-strix-g513im = import ./asus/rog-strix/g513im;
|
||||
asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie;
|
||||
asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs;
|
||||
asus-rog-strix-x570e = import ./asus/rog-strix/x570e;
|
||||
asus-zenbook-ux371 = import ./asus/zenbook/ux371;
|
||||
asus-zephyrus-ga401 = import ./asus/zephyrus/ga401;
|
||||
asus-zephyrus-ga402 = import ./asus/zephyrus/ga402;
|
||||
asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x;
|
||||
asus-zephyrus-ga402x-amdgpu = import ./asus/zephyrus/ga402x/amdgpu;
|
||||
asus-zephyrus-ga402x-nvidia = import ./asus/zephyrus/ga402x/nvidia;
|
||||
asus-zephyrus-ga502 = import ./asus/zephyrus/ga502;
|
||||
asus-zephyrus-ga503 = import ./asus/zephyrus/ga503;
|
||||
asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h;
|
||||
beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle;
|
||||
chuwi-minibook-x = import ./chuwi/minibook-x;
|
||||
deciso-dec = import ./deciso/dec;
|
||||
dell-e7240 = import ./dell/e7240;
|
||||
dell-g3-3779 = import ./dell/g3/3779;
|
||||
|
@ -44,6 +55,8 @@
|
|||
dell-latitude-7390 = import ./dell/latitude/7390;
|
||||
dell-latitude-7430 = import ./dell/latitude/7430;
|
||||
dell-latitude-7490 = import ./dell/latitude/7490;
|
||||
dell-latitude-9430 = import ./dell/latitude/9430;
|
||||
dell-optiplex-3050 = import ./dell/optiplex/3050;
|
||||
dell-poweredge-r7515 = import ./dell/poweredge/r7515;
|
||||
dell-precision-3541 = import ./dell/precision/3541;
|
||||
dell-precision-5530 = import ./dell/precision/5530;
|
||||
|
@ -85,6 +98,7 @@
|
|||
friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4;
|
||||
friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s;
|
||||
focus-m2-gen1 = import ./focus/m2/gen1;
|
||||
gigabyte-b550 = import ./gigabyte/b550;
|
||||
google-pixelbook = import ./google/pixelbook;
|
||||
gpd-micropc = import ./gpd/micropc;
|
||||
gpd-p2-max = import ./gpd/p2-max;
|
||||
|
@ -96,13 +110,18 @@
|
|||
hp-elitebook-845g7 = import ./hp/elitebook/845/g7;
|
||||
hp-elitebook-845g8 = import ./hp/elitebook/845/g8;
|
||||
hp-elitebook-845g9 = import ./hp/elitebook/845/g9;
|
||||
huawei-machc-wa = import ./huawei/machc-wa;
|
||||
hp-notebook-14-df0023 = import ./hp/notebook/14-df0023;
|
||||
intel-nuc-8i7beh = import ./intel/nuc/8i7beh;
|
||||
lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6;
|
||||
lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05;
|
||||
lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6;
|
||||
lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6;
|
||||
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-15ach6h = import ./lenovo/legion/15ach6h;
|
||||
lenovo-legion-15arh05h = import ./lenovo/legion/15arh05h;
|
||||
lenovo-legion-16ach6h = import ./lenovo/legion/16ach6h;
|
||||
lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid;
|
||||
|
@ -142,8 +161,10 @@
|
|||
lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2;
|
||||
lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3;
|
||||
lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4;
|
||||
lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5;
|
||||
lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s;
|
||||
lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1;
|
||||
lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4;
|
||||
lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410;
|
||||
lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420;
|
||||
lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430;
|
||||
|
@ -170,6 +191,7 @@
|
|||
lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen;
|
||||
lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen;
|
||||
lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen;
|
||||
lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen;
|
||||
lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme;
|
||||
lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2;
|
||||
lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4;
|
||||
|
@ -193,6 +215,8 @@
|
|||
lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13;
|
||||
lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6;
|
||||
lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7;
|
||||
lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu;
|
||||
lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia;
|
||||
lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8;
|
||||
letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4;
|
||||
microchip-icicle-kit = import ./microchip/icicle-kit;
|
||||
|
@ -201,6 +225,7 @@
|
|||
microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd;
|
||||
microsoft-surface-common = import ./microsoft/surface/common;
|
||||
microsoft-surface-pro-3 = import ./microsoft/surface-pro/3;
|
||||
microsoft-surface-pro-9 = import ./microsoft/surface-pro/9;
|
||||
milkv-pioneer = import ./milkv/pioneer;
|
||||
morefine-m600 = import ./morefine/m600;
|
||||
msi-b350-tomahawk = import ./msi/b350-tomahawk;
|
||||
|
@ -215,6 +240,7 @@
|
|||
omen-14-fb0798ng = import ./omen/14-fb0798ng;
|
||||
omen-15-en0010ca = import ./omen/15-en0010ca;
|
||||
omen-16-n0005ne = import ./omen/16-n0005ne;
|
||||
omen-16-n0280nd = import ./omen/16-n0280nd;
|
||||
omen-15-en1007sa = import ./omen/15-en1007sa;
|
||||
omen-15-en0002np = import ./omen/15-en0002np;
|
||||
onenetbook-4 = import ./onenetbook/4;
|
||||
|
@ -228,6 +254,7 @@
|
|||
purism-librem-15v3 = import ./purism/librem/15v3;
|
||||
purism-librem-5r4 = import ./purism/librem/5r4;
|
||||
raspberry-pi-2 = import ./raspberry-pi/2;
|
||||
raspberry-pi-3 = import ./raspberry-pi/3;
|
||||
raspberry-pi-4 = import ./raspberry-pi/4;
|
||||
raspberry-pi-5 = import ./raspberry-pi/5;
|
||||
kobol-helios4 = import ./kobol/helios4;
|
||||
|
@ -240,6 +267,7 @@
|
|||
supermicro-x10sll-f = import ./supermicro/x10sll-f;
|
||||
supermicro-x12scz-tln4f = import ./supermicro/x12scz-tln4f;
|
||||
system76 = import ./system76;
|
||||
system76-gaze18 = import ./system76/gaze18;
|
||||
system76-darp6 = import ./system76/darp6;
|
||||
toshiba-swanky = import ./toshiba/swanky;
|
||||
tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4;
|
||||
|
@ -252,10 +280,10 @@
|
|||
common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix;
|
||||
common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix;
|
||||
common-cpu-intel = import ./common/cpu/intel;
|
||||
common-cpu-intel-comet-lake = import ./common/cpu/intel/comet-lake;
|
||||
common-gpu-intel-comet-lake = deprecated "992" "common-gpu-intel-comet-lake" (import ./common/gpu/intel/comet-lake);
|
||||
common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix;
|
||||
common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake;
|
||||
common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge;
|
||||
common-gpu-intel-kaby-lake = deprecated "992" "common-gpu-intel-kaby-lake" (import ./common/gpu/intel/kaby-lake);
|
||||
common-gpu-intel-sandy-bridge = deprecated "992" "common-gpu-intel-sandy-bridge" (import ./common/gpu/intel/sandy-bridge);
|
||||
common-gpu-amd = import ./common/gpu/amd;
|
||||
common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands;
|
||||
common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands;
|
||||
|
|
|
@ -18,10 +18,9 @@
|
|||
boot.blacklistedKernelModules = [ "i2c_nvidia_gpu" ];
|
||||
|
||||
hardware.nvidia.modesetting.enable = lib.mkDefault true;
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
driSupport = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
};
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
../../kmod.nix
|
||||
../../framework-tool.nix
|
||||
];
|
||||
|
||||
|
@ -25,4 +26,14 @@
|
|||
|
||||
# Enable keyboard customization
|
||||
hardware.keyboard.qmk.enable = lib.mkDefault true;
|
||||
|
||||
# Allow `services.libinput.touchpad.disableWhileTyping` to work correctly.
|
||||
# Set unconditionally because libinput can also be configured dynamically via
|
||||
# gsettings.
|
||||
environment.etc."libinput/local-overrides.quirks".text = ''
|
||||
[Serial Keyboards]
|
||||
MatchUdevType=keyboard
|
||||
MatchName=Framework Laptop 16 Keyboard Module - ANSI Keyboard
|
||||
AttrKeyboardIntegration=internal
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -13,12 +13,38 @@ First put enable `fwupd`
|
|||
services.fwupd.enable = true;
|
||||
```
|
||||
|
||||
> [!Note]
|
||||
> For Intel CPU's, even [stable BIOS versions](https://community.frame.work/t/responded-11th-gen-intel-core-bios-3-17-release/25137#update-april-11-2023-2) are currently marked as [test versions](https://fwupd.org/lvfs/devices/work.frame.Laptop.TGL.BIOS.firmware) in LVFS (the default remote fwupd uses to get firmware).
|
||||
>
|
||||
> If you want to use these versions, you'll have to [explicitly enable the lvfs-testing remote](https://community.frame.work/t/responded-11th-gen-intel-core-bios-3-17-release/25137#linuxlvfs-7):
|
||||
>
|
||||
> ```nix
|
||||
> services.fwupd.extraRemotes = [ "lvfs-testing" ];
|
||||
> # Might be necessary once to make the update succeed
|
||||
> services.fwupd.uefiCapsuleSettings.DisableCapsuleUpdateOnDisk = true;
|
||||
> ```
|
||||
|
||||
> [!Caution]
|
||||
> Before running the update, make sure you have a [NixOS live ISO](https://nixos.org/download/#nixos-iso) on a USB stick, because some firmware updates [make your system unbootable](https://community.frame.work/t/drive-not-bootable-after-bios-update/12887).
|
||||
|
||||
Then run
|
||||
|
||||
```sh
|
||||
$ fwupdmgr update
|
||||
```
|
||||
|
||||
If you cannot boot into your system after upgrading:
|
||||
1. Boot into the live USB
|
||||
2. Mount your system into `/mnt`
|
||||
3. Run
|
||||
```
|
||||
sudo nixos-enter
|
||||
```
|
||||
4. Run
|
||||
```
|
||||
NIXOS_INSTALL_BOOTLOADER=1 /run/current-system/bin/switch-to-configuration boot
|
||||
```
|
||||
|
||||
## Common Modules
|
||||
|
||||
For the Framework 13 laptops, there are common configuration modules available under the `13-inch/common/` directory,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.hardware.framework.enableKmod = lib.mkEnableOption (lib.mdDoc
|
||||
options.hardware.framework.enableKmod = lib.mkEnableOption
|
||||
"Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs."
|
||||
) // {
|
||||
// {
|
||||
# Enable by default if on new enough version of NixOS
|
||||
default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05");
|
||||
};
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
};
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi''";
|
||||
ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi'";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
imports = [
|
||||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/cpu/intel/kaby-lake
|
||||
../../common/gpu/intel/kaby-lake
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/cpu/intel
|
||||
../../common/cpu/intel/kaby-lake
|
||||
../../common/gpu/intel/kaby-lake
|
||||
../../common/hidpi.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ in
|
|||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/hidpi.nix
|
||||
../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
|
||||
# Necessary kernel modules
|
||||
|
@ -14,7 +15,7 @@ in
|
|||
# GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU
|
||||
boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays
|
||||
services.xserver.videoDrivers = [ "intel" ];
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
|
||||
];
|
||||
|
|
|
@ -18,7 +18,7 @@ in
|
|||
hardware.sensor.iio.bmi260.enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = mdDoc ''
|
||||
description = ''
|
||||
Enable Bosch BMI260 IMU kernel module driver.
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ in
|
|||
# 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.") // {
|
||||
enable = mkEnableOption "Enable PPT control for device by ryzenadj." // {
|
||||
# Default increase PPT to the BIOS default when power adapter plugin to increase performance.
|
||||
default = true;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
../../common/cpu/intel/jasper-lake
|
||||
../../common/gpu/intel/jasper-lake
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,11 +3,10 @@ with lib;
|
|||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/gpu/intel/sandy-bridge
|
||||
../../../common/pc
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/hdd
|
||||
../../../common/pc/hdd
|
||||
|
||||
./network.nix
|
||||
];
|
||||
|
|
|
@ -3,11 +3,10 @@ with lib;
|
|||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/gpu/intel/sandy-bridge
|
||||
../../../common/pc
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/hdd
|
||||
../../../common/pc/hdd
|
||||
];
|
||||
|
||||
config = {
|
||||
|
|
3
huawei/machc-wa/README.md
Normal file
3
huawei/machc-wa/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Huawei Matebook X Pro (2020)
|
||||
|
||||
This is a very standard device that needs little configuration. The module mainly imports the common modules for its CPU, GPU, SSD etc. and enables ppd for power management. Nvidia prime offload is also enabled. This configuration should work with all Matebook X Pro models from 2020 (MACHC-WA*) other than MACHC-WAH9L as it does not contain the Nvidia GPU.
|
28
huawei/machc-wa/default.nix
Normal file
28
huawei/machc-wa/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../common/cpu/intel
|
||||
../../common/gpu/intel/comet-lake
|
||||
../../common/gpu/nvidia
|
||||
../../common/gpu/nvidia/prime.nix
|
||||
../../common/hidpi.nix
|
||||
../../common/pc/laptop
|
||||
../../common/pc/ssd
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
open = lib.mkDefault false;
|
||||
nvidiaSettings = lib.mkDefault true;
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
services.power-profiles-daemon.enable = lib.mkDefault true;
|
||||
}
|
25
lenovo/ideapad/15ach6/README.md
Normal file
25
lenovo/ideapad/15ach6/README.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Lenovo IdeaPad Gaming 3 15ACH6
|
||||
|
||||
This device supports "battery conservation mode", which charges the battery to only ~60%. This mode can be enabled using [TLP](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series):
|
||||
|
||||
## Device information
|
||||
|
||||
Details from `tlp-stat`:
|
||||
|
||||
```
|
||||
System = LENOVO IdeaPad Gaming 3 15ACH6 82K2
|
||||
BIOS = H3CN31WW(V2.01)
|
||||
EC Firmware = 1.31
|
||||
OS Release = NixOS 24.11 (Vicuna)
|
||||
Kernel = 6.6.37 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jul 5 07:34:07 UTC 2024 x86_64
|
||||
Init system = systemd
|
||||
Boot mode = UEFI
|
||||
Suspend mode = s2idle [deep]
|
||||
```
|
||||
|
||||
`lspci` output:
|
||||
|
||||
```
|
||||
01:00.0 3D controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
|
||||
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c6)
|
||||
```
|
20
lenovo/ideapad/15ach6/default.nix
Normal file
20
lenovo/ideapad/15ach6/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ 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
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:6:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
}
|
11
lenovo/ideapad/15alc6/default.nix
Normal file
11
lenovo/ideapad/15alc6/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/amd
|
||||
../../../common/gpu/amd
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
}
|
41
lenovo/ideapad/16ach6/README.md
Normal file
41
lenovo/ideapad/16ach6/README.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Lenovo IdeaPad 5 Pro 16ACH6
|
||||
|
||||
This laptop comes with an AMD CPU+GPU and dedicated NVIDIA graphics. Unlike the similarly named [Legion 5 Pro 16ACH6*H*](../../legion/16ach6h/), there is no direct dedicated graphics setting.
|
||||
|
||||
The `nvidia.hardware.powerManagement.enable` option is not enabled in this configuration, since it seemed to cause issues when waking up from suspend, while also not providing much in terms of power saving. I've tested with `finegrained` both enabled and disabled, and it caused the screen to go dark a few moments after waking up from suspend. Most times this only happened once and the screen came back after a few moments, but on some occasions it kept occurring repeatedly.
|
||||
|
||||
This device also has a "battery conservation mode", which charges the battery to only ~60%. This mode can be enabled using [TLP](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series):
|
||||
|
||||
```nix
|
||||
services.power-profiles-daemon.enable = false;
|
||||
services.tlp.enable = true;
|
||||
services.tlp.settings = {
|
||||
# Enable battery conservation mode
|
||||
# Run `sudo tlp fullcharge` to enable a full charge until next reboot,
|
||||
# and `sudo tlp setcharge` to reset to conservation mode.
|
||||
START_CHARGE_THRESH_BAT0 = 0;
|
||||
STOP_CHARGE_THRESH_BAT0 = 1;
|
||||
};
|
||||
```
|
||||
|
||||
## Device information
|
||||
|
||||
Details from `tlp-stat`:
|
||||
|
||||
```
|
||||
System = LENOVO IdeaPad 5 Pro 16ACH6 82L5
|
||||
BIOS = GSCN35WW
|
||||
EC Firmware = 1.35
|
||||
OS Release = NixOS 23.11 (Tapir)
|
||||
Kernel = 6.6.10 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jan 5 14:19:45 UTC 2024 x86_64
|
||||
Init system = systemd
|
||||
Boot mode = UEFI
|
||||
Suspend mode = [s2idle]
|
||||
```
|
||||
|
||||
`lspci` output:
|
||||
|
||||
```
|
||||
01:00.0 3D controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] (rev a1)
|
||||
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4)
|
||||
```
|
20
lenovo/ideapad/16ach6/default.nix
Normal file
20
lenovo/ideapad/16ach6/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ 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
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:5:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware = {
|
||||
amdgpu.loadInInitrd = lib.mkDefault false;
|
||||
amdgpu.initrd.enable = false;
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ lib, options, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../hybrid ];
|
||||
|
@ -9,18 +9,11 @@
|
|||
# because when writing the specialization of Dual-Direct GFX, I did not completely
|
||||
# remove all packages for amd igpu. I only removed amdgpu from
|
||||
# services.xserver.videoDrivers by overriding. This is because the specialization
|
||||
# of nix cannot implement such an operation as canceling an import. In the end, if
|
||||
# it is enabled in Dual-Direct GFX In the absence of amd igpu, the amdvlk package
|
||||
# caused the proton to crash. In order to solve this problem, I add the option of
|
||||
# whether to enable amdvlk to the configuration file of amd gpu, and open it by
|
||||
# default, and turn it off in specialization, so as to delete amdvlk package and
|
||||
# other packages for amd igpu in specialization. At the same time, I also added an
|
||||
# option to amdgpu's opencl runtime.
|
||||
# of nix cannot implement such an operation as canceling an import.
|
||||
hardware = {
|
||||
nvidia.prime.offload.enable = false;
|
||||
amdgpu = {
|
||||
amdvlk = false;
|
||||
opencl = false;
|
||||
};
|
||||
} // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
|
||||
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
|
||||
amdgpu.opencl.enable = lib.mkDefault false;
|
||||
};
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
imports = [
|
||||
../../../../common/cpu/amd
|
||||
../../../../common/cpu/amd/pstate.nix
|
||||
../../../../common/cpu/amd/zenpower.nix
|
||||
../../../../common/gpu/amd
|
||||
../../../../common/gpu/nvidia/prime.nix
|
||||
../../../../common/pc/laptop
|
||||
|
@ -21,7 +22,7 @@
|
|||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware = {
|
||||
amdgpu.loadInInitrd = lib.mkDefault false;
|
||||
amdgpu.initrd.enable = false;
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ lib, options, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../hybrid ];
|
||||
|
@ -9,18 +9,11 @@
|
|||
# because when writing the specialization of Dual-Direct GFX, I did not completely
|
||||
# remove all packages for amd igpu. I only removed amdgpu from
|
||||
# services.xserver.videoDrivers by overriding. This is because the specialization
|
||||
# of nix cannot implement such an operation as canceling an import. In the end, if
|
||||
# it is enabled in Dual-Direct GFX In the absence of amd igpu, the amdvlk package
|
||||
# caused the proton to crash. In order to solve this problem, I add the option of
|
||||
# whether to enable amdvlk to the configuration file of amd gpu, and open it by
|
||||
# default, and turn it off in specialization, so as to delete amdvlk package and
|
||||
# other packages for amd igpu in specialization. At the same time, I also added an
|
||||
# option to amdgpu's opencl runtime.
|
||||
# of nix cannot implement such an operation as canceling an import.
|
||||
hardware = {
|
||||
nvidia.prime.offload.enable = false;
|
||||
amdgpu = {
|
||||
amdvlk = false;
|
||||
opencl = false;
|
||||
};
|
||||
} // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
|
||||
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
|
||||
amdgpu.opencl.enable = lib.mkDefault false;
|
||||
};
|
||||
}
|
|
@ -1,13 +1,12 @@
|
|||
{ ... }:
|
||||
{ lib, options, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../hybrid ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware = {
|
||||
nvidia.prime.offload.enable = false;
|
||||
amdgpu = {
|
||||
amdvlk = false;
|
||||
opencl = false;
|
||||
};
|
||||
} // lib.optionalAttrs (options ? amdgpu.opencl.enable) {
|
||||
# introduced in https://github.com/NixOS/nixpkgs/pull/319865
|
||||
amdgpu.opencl.enable = lib.mkDefault false;
|
||||
};
|
||||
}
|
|
@ -14,8 +14,8 @@ in
|
|||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# Kernel 6.9 includes the speaker fix, so only install this on systems with older kernels.
|
||||
boot.extraModulePackages = lib.mkIf (!(lib.versionOlder config.boot.kernelPackages.kernel.version "6.9")) [ lenovo-speaker-fix ];
|
||||
# Kernel 6.10 includes the speaker fix, so only install this on systems with older kernels.
|
||||
boot.extraModulePackages = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") [ lenovo-speaker-fix ];
|
||||
|
||||
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
|
||||
services.xserver.dpi = 189;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
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";
|
||||
imports = [
|
||||
../../../../common/gpu/24.05-compat.nix
|
||||
];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
};
|
||||
nvidia = {
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,12 +13,6 @@
|
|||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
# is this too much? It's convenient for Steam.
|
||||
opengl = {
|
||||
driSupport = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
# required to make wireless work
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
{ config, lib, ... }: {
|
||||
imports = [
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
../../../common/cpu/intel
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/intel/kaby-lake
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
prime = {
|
||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
# is this too much? It's convenient for Steam.
|
||||
opengl = {
|
||||
driSupport = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
# required to make wireless work
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }: {
|
||||
imports = [
|
||||
../../../common/gpu/24.05-compat.nix
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
|
@ -7,18 +8,18 @@
|
|||
];
|
||||
|
||||
hardware = {
|
||||
# is this too much? It's convenient for Steam.
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
prime = {
|
||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
# is this too much? It's convenient for Steam.
|
||||
opengl = {
|
||||
driSupport = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
# required to make wireless work
|
||||
|
|
12
lenovo/thinkpad/t14/amd/gen5/default.nix
Normal file
12
lenovo/thinkpad/t14/amd/gen5/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../../common/cpu/amd/pstate.nix
|
||||
];
|
||||
|
||||
# For the Qualcomm NFA765 [17cb:1103] wireless network controller
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=2047878
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;
|
||||
}
|
|
@ -14,7 +14,11 @@
|
|||
|
||||
# Force use of the thinkpad_acpi driver for backlight control.
|
||||
# This allows the backlight save/load systemd service to work.
|
||||
boot.kernelParams = [ "acpi_backlight=native" ];
|
||||
boot.kernelParams = [
|
||||
"acpi_backlight=native"
|
||||
# Needed for touchpad to work properly (click doesn't register by pushing down the touchpad).
|
||||
"psmouse.synaptics_intertouch=0"
|
||||
];
|
||||
|
||||
# see https://github.com/NixOS/nixpkgs/issues/69289
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;
|
||||
|
|
9
lenovo/thinkpad/t14s/amd/gen4/default.nix
Normal file
9
lenovo/thinkpad/t14s/amd/gen4/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
];
|
||||
|
||||
# Fix laptop not properly powering off during shutdown.
|
||||
boot.kernelParams = [ "apm=power_off" ];
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
imports = [
|
||||
../.
|
||||
../tp-smapi.nix
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/gpu/intel/sandy-bridge
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
imports = [
|
||||
../.
|
||||
../tp-smapi.nix
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/gpu/intel/sandy-bridge
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
imports = [
|
||||
../.
|
||||
../tp-smapi.nix
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/gpu/intel/sandy-bridge
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
|
|
8
lenovo/thinkpad/x1/12th-gen/default.nix
Normal file
8
lenovo/thinkpad/x1/12th-gen/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint";
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/gpu/intel/sandy-bridge
|
||||
../../../common/pc/laptop/hdd # TODO: reverse compat
|
||||
../tp-smapi.nix
|
||||
];
|
||||
|
|
|
@ -9,9 +9,4 @@
|
|||
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X260#Thinkpad_X260
|
||||
"i915.enable_psr=0"
|
||||
];
|
||||
|
||||
# https://wiki.archlinux.org/index.php/TLP#Btrfs
|
||||
services.tlp.settings = {
|
||||
SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
|
||||
};
|
||||
}
|
||||
|
|
9
lenovo/thinkpad/z/gen2/z13/asound.conf
Normal file
9
lenovo/thinkpad/z/gen2/z13/asound.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
pcm.!default {
|
||||
type plug
|
||||
slave.pcm "hw:1,0"
|
||||
}
|
||||
|
||||
ctl.!default {
|
||||
type hw
|
||||
card 1
|
||||
}
|
|
@ -5,15 +5,5 @@
|
|||
../../../../../lenovo/thinkpad/z/gen2
|
||||
];
|
||||
|
||||
sound.extraConfig = ''
|
||||
pcm.!default {
|
||||
type plug
|
||||
slave.pcm "hw:1,0"
|
||||
}
|
||||
|
||||
ctl.!default {
|
||||
type hw
|
||||
card 1
|
||||
}
|
||||
'';
|
||||
environment.etc."asound.conf".source = ./asound.conf;
|
||||
}
|
||||
|
|
|
@ -7,14 +7,12 @@
|
|||
];
|
||||
|
||||
boot.initrd.kernelModules = [ "ideapad_laptop" ];
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
|
||||
# latest kernel needed to make wifi work
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest;
|
||||
|
||||
# energy savings
|
||||
boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue