mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-11-30 13:03:30 +01:00
Compare commits
308
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
936e464909 | ||
|
|
38af9c5048 | ||
|
|
9e58ee154c | ||
|
|
bd06334074 | ||
|
|
2b4ed534a8 | ||
|
|
cdaf66c0a0 | ||
|
|
b72c683304 | ||
|
|
02f067b234 | ||
|
|
52060c81af | ||
|
|
68babad7f9 | ||
|
|
da67c36853 | ||
|
|
f7540d6c27 | ||
|
|
09febc71c1 | ||
|
|
241d8300b2 | ||
|
|
00b40b766f | ||
|
|
590bdcacd5 | ||
|
|
dbbd0d4093 | ||
|
|
267d8b2d7f | ||
|
|
40ddf363c2 | ||
|
|
7c00c8b5ca | ||
|
|
3ef0c9521c | ||
|
|
eb9d3e7df1 | ||
|
|
085790185c | ||
|
|
5bf5dee4f5 | ||
|
|
3714e747c1 | ||
|
|
bbb03cc6fe | ||
|
|
c52f18ba51 | ||
|
|
f2b2ae018d | ||
|
|
758bc63af2 | ||
|
|
681ffa8a8c | ||
|
|
6075b4d856 | ||
|
|
6406b7ae3f | ||
|
|
bf19677a5f | ||
|
|
007f1d8a07 | ||
|
|
d3cd9a2229 | ||
|
|
31f61b90dd | ||
|
|
055971b825 | ||
|
|
831de9cac9 | ||
|
|
cca70642e8 | ||
|
|
bfbb77e8f1 | ||
|
|
523d8efb5d | ||
|
|
91162d3f17 | ||
|
|
720d531b1c | ||
|
|
94f7c2cb9c | ||
|
|
920bffdfbc | ||
|
|
be4115ae23 | ||
|
|
61210f5e44 | ||
|
|
6f392a3ffb | ||
|
|
98d19435d0 | ||
|
|
128b64dada | ||
|
|
6972d78ffb | ||
|
|
e274b742e1 | ||
|
|
3caaa0588e | ||
|
|
36094450fd | ||
|
|
c9b965a43e | ||
|
|
c41f572654 | ||
|
|
f361f64db0 | ||
|
|
d1e64db4c5 | ||
|
|
4f6aad61b6 | ||
|
|
9e7cd653f9 | ||
|
|
311c6bf0ef | ||
|
|
e901e80233 | ||
|
|
4bbf156238 | ||
|
|
0359644c22 | ||
|
|
cc5d84ccef | ||
|
|
08d1c4dd2b | ||
|
|
7f1da4009b | ||
|
|
154350aa04 | ||
|
|
cdea79566b | ||
|
|
b60b1f95eb | ||
|
|
f0486916bf | ||
|
|
b23e492fe5 | ||
|
|
3345b81777 | ||
|
|
bcbbd2bd72 | ||
|
|
631011a23c | ||
|
|
86d77642bd | ||
|
|
f8c3b6e50e | ||
|
|
eb2721b3f1 | ||
|
|
a9b2d0e3f1 | ||
|
|
56f4b2df00 | ||
|
|
77aa0ff827 | ||
|
|
115770eed0 | ||
|
|
0e2334c531 | ||
|
|
0cb5491af9 | ||
|
|
be2f416029 | ||
|
|
72002dabdc | ||
|
|
a989fd823e | ||
|
|
b22284989a | ||
|
|
08076a7b73 | ||
|
|
f9378480c0 | ||
|
|
080c44106f | ||
|
|
3657e7c334 | ||
|
|
f59106598e | ||
|
|
9a35571829 | ||
|
|
d6a1231181 | ||
|
|
a0d8383c42 | ||
|
|
874830945a | ||
|
|
f0719aa6d1 | ||
|
|
fb1682bab4 | ||
|
|
fd89332b4a | ||
|
|
6484d285c5 | ||
|
|
c242378e63 | ||
|
|
1ea590a853 | ||
|
|
0a0e0a2e49 | ||
|
|
87522b29a2 | ||
|
|
dc5fa221b2 | ||
|
|
025c7a2a7e | ||
|
|
060c89b69f | ||
|
|
6531786e2d | ||
|
|
b371da6e8d | ||
|
|
34c1bf11bb | ||
|
|
abfae8841b | ||
|
|
0db1582e2a | ||
|
|
21ed8edd62 | ||
|
|
e64aafa1ff | ||
|
|
1a2c40134f | ||
|
|
08d900d475 | ||
|
|
40ade7c034 | ||
|
|
25c35ed7b7 | ||
|
|
8b04c30d8b | ||
|
|
1b4ce6426f | ||
|
|
6a0f1a9e84 | ||
|
|
26e9c94511 | ||
|
|
2a9ea518bd | ||
|
|
fd644de340 | ||
|
|
de6811f14d | ||
|
|
d2ac7fb650 | ||
|
|
46a68df837 | ||
|
|
04c79afe1c | ||
|
|
81b5488961 | ||
|
|
3cffbd5961 | ||
|
|
42ec21a27c | ||
|
|
e8c5f886b0 | ||
|
|
653f7ba3ca | ||
|
|
770dbcdb49 | ||
|
|
986f101a66 | ||
|
|
b3827275b7 | ||
|
|
ccf7985cb3 | ||
|
|
d43b95a86e | ||
|
|
7234b11dff | ||
|
|
fdc0812787 | ||
|
|
d86324ba69 | ||
|
|
55acbf7497 | ||
|
|
9d36eb67f2 | ||
|
|
f3eb1498e9 | ||
|
|
b175484c5a | ||
|
|
9bc1f316a6 | ||
|
|
338792821a | ||
|
|
684eaddf74 | ||
|
|
4e3aa0b6ce | ||
|
|
602f9d86c6 | ||
|
|
0c5f176147 | ||
|
|
f2b06f530e | ||
|
|
31f1498247 | ||
|
|
984c72f653 | ||
|
|
c75ebd4129 | ||
|
|
741b3ba508 | ||
|
|
55f9eb6a73 | ||
|
|
cc72f59d5a | ||
|
|
b5a87414c6 | ||
|
|
eb070c346b | ||
|
|
ad72510a2b | ||
|
|
d56b2e96a6 | ||
|
|
8e984dc856 | ||
|
|
823f0bc77f | ||
|
|
b7a5f1188f | ||
|
|
6ffcdbacc5 | ||
|
|
cc353d439e | ||
|
|
618819cc49 | ||
|
|
62f453938f | ||
|
|
1ab852b88e | ||
|
|
841caf7d20 | ||
|
|
5faf94b86f | ||
|
|
a78b8b6476 | ||
|
|
6efc6af71a | ||
|
|
80a32af201 | ||
|
|
373856f3e1 | ||
|
|
9146011f0b | ||
|
|
2f2c2d9ef5 | ||
|
|
385c5ba916 | ||
|
|
90868c67e8 | ||
|
|
a13d00bd7c | ||
|
|
4b129a0f71 | ||
|
|
75a850cb3e | ||
|
|
eae378658f | ||
|
|
8c320bbc8a | ||
|
|
744d5561be | ||
|
|
718eaeed75 | ||
|
|
5f830cf8fc | ||
|
|
a36f343222 | ||
|
|
69b9bdd53a | ||
|
|
8e8e65ba45 | ||
|
|
16cdc10b48 | ||
|
|
565f837027 | ||
|
|
130560e553 | ||
|
|
4ef357fe8b | ||
|
|
d7d897fe24 | ||
|
|
d928c96e3c | ||
|
|
7efd48f100 | ||
|
|
bb1a8b78ba | ||
|
|
c8e3843b0a | ||
|
|
c71abe67b9 | ||
|
|
41d2c3322b | ||
|
|
16336614d3 | ||
|
|
76f681355c | ||
|
|
e58c64a03c | ||
|
|
157ae443af | ||
|
|
0ef7d22b6c | ||
|
|
edb7199b5c | ||
|
|
12bb72aa6b | ||
|
|
9238b5f06e | ||
|
|
c6722b86bf | ||
|
|
f4364f2457 | ||
|
|
03dedf4cfd | ||
|
|
9f6d639110 | ||
|
|
3d983701f9 | ||
|
|
62d7c2eddf | ||
|
|
62a1812f3c | ||
|
|
9c952961f1 | ||
|
|
5904e7605c | ||
|
|
26454a206d | ||
|
|
8b50556e2d | ||
|
|
74efa57ee4 | ||
|
|
7accb4efab | ||
|
|
9506048413 | ||
|
|
f5a4954ca3 | ||
|
|
859cd11263 | ||
|
|
6c7550d0b4 | ||
|
|
f6e2381344 | ||
|
|
d75b12a962 | ||
|
|
6f502bc6e6 | ||
|
|
67814a0d5c | ||
|
|
6587634ad8 | ||
|
|
521f680999 | ||
|
|
2ab4e61b32 | ||
|
|
4e19a42bd2 | ||
|
|
77983d16f6 | ||
|
|
5758237cbc | ||
|
|
cc7140b4bf | ||
|
|
22a16c801c | ||
|
|
3f1a5617bf | ||
|
|
f128fbbdd6 | ||
|
|
53ca456f60 | ||
|
|
64afb7c12d | ||
|
|
814bd1a024 | ||
|
|
c30e20594b | ||
|
|
6081bfd6d5 | ||
|
|
89c4ddb0e6 | ||
|
|
1d746f2298 | ||
|
|
c3b2ac63ff | ||
|
|
adecd1113c | ||
|
|
19b4d5cede | ||
|
|
5575153e2d | ||
|
|
5316e919c8 | ||
|
|
c0182a0698 | ||
|
|
4916acd221 | ||
|
|
1ea7efa262 | ||
|
|
2bf94227c1 | ||
|
|
ed0d3cc198 | ||
|
|
77f581a4b5 | ||
|
|
d942730634 | ||
|
|
ea09bae153 | ||
|
|
05e63ee072 | ||
|
|
f08177ef66 | ||
|
|
91eba96d66 | ||
|
|
b60ea643a4 | ||
|
|
de600352bc | ||
|
|
26bbc980b9 | ||
|
|
0435629061 | ||
|
|
2db2362e8f | ||
|
|
83ca0c4e6b | ||
|
|
4ffa2ed198 | ||
|
|
6016f29d62 | ||
|
|
5932cef1b9 | ||
|
|
e338e4ee16 | ||
|
|
9e7fffdd5b | ||
|
|
abca8d0180 | ||
|
|
4c8b4cf54f | ||
|
|
03db9669a6 | ||
|
|
34f24f2480 | ||
|
|
e1a10b1536 | ||
|
|
54268d11ae | ||
|
|
1d9358a8cf | ||
|
|
f870de5eae | ||
|
|
79e188ac6b | ||
|
|
2691961397 | ||
|
|
83c44abc3f | ||
|
|
59c97be4d0 | ||
|
|
e585114348 | ||
|
|
a5db2c9eaf | ||
|
|
127dbfd849 | ||
|
|
a8ea967866 | ||
|
|
1e4abf794a | ||
|
|
0dd12e05e5 | ||
|
|
a23235a6ed | ||
|
|
a2e36c1b0c | ||
|
|
3dac9eae9a | ||
|
|
36d8bd88cd | ||
|
|
2b8807f75b | ||
|
|
411e9e10b9 | ||
|
|
f0db394fbf | ||
|
|
b4e2df6aac | ||
|
|
a9033dcc5f | ||
|
|
bd1ef85b98 | ||
|
|
1e2c130d38 | ||
|
|
99cdc88306 | ||
|
|
3d337906f5 | ||
|
|
1d254aceda |
No files matched your search
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -0,0 +1,15 @@
|
||||
name: "Test"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: cachix/install-nix-action@v13
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||
- run: ./tests/run.py
|
||||
@@ -1,2 +0,0 @@
|
||||
language: nix
|
||||
script: nix-build --dry-run --show-trace
|
||||
@@ -1,6 +1,8 @@
|
||||
beagleboard/pocketbeagle @yegortimoshenko
|
||||
dell/xps/13-9370 @moredread
|
||||
dell/xps/13-9380 @kalbasit
|
||||
lenovo/thinkpad/x230 @makefu @yegortimoshenko
|
||||
lenovo/thinkpad/x250 @Mic92
|
||||
pcengines/apu @yegortimoshenko
|
||||
purism/librem/13v3 @yegortimoshenko
|
||||
system76/darp6 @khumba
|
||||
@@ -1,12 +1,14 @@
|
||||
NixOS profiles covering hardware quirks.
|
||||
NixOS profiles to optimize settings for different hardware.
|
||||
|
||||
## Setup
|
||||
|
||||
### Using channels
|
||||
|
||||
Add and update `nixos-hardware` channel:
|
||||
|
||||
```
|
||||
$ sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
|
||||
$ sudo nix-channel --update nixos-hardware
|
||||
$ sudo nix-channel --update
|
||||
```
|
||||
|
||||
Then import an appropriate profile path from the table below. For example, to
|
||||
@@ -20,51 +22,168 @@ imports = [
|
||||
];
|
||||
```
|
||||
|
||||
## Profiles
|
||||
New updates to the expressions here will be fetched when you update the channel.
|
||||
|
||||
| Model | Path |
|
||||
| --------------------------------- | -------------------------------------------- |
|
||||
| [Acer Aspire 4810T][] | `<nixos-hardware/acer/aspire/4810t>` |
|
||||
| Airis N990 | `<nixos-hardware/airis/n990>` |
|
||||
| Apple MacBook Air 4,X | `<nixos-hardware/apple/macbook-air/4>` |
|
||||
| Apple MacBook Air 6,X | `<nixos-hardware/apple/macbook-air/6>` |
|
||||
| [Apple MacBook Pro 10,1][] | `<nixos-hardware/apple/macbook-pro/10-1>` |
|
||||
| Apple MacBook Pro 12,1 | `<nixos-hardware/apple/macbook-pro/12-1>` |
|
||||
| BeagleBoard PocketBeagle | `<nixos-hardware/beagleboard/pocketbeagle>` |
|
||||
| [Dell XPS 13 9370][] | `<nixos-hardware/dell/xps/13-9370>` |
|
||||
| [Dell XPS 15 9550][] | `<nixos-hardware/dell/xps/15-9550>` |
|
||||
| [Inverse Path USB armory][] | `<nixos-hardware/inversepath/usbarmory>` |
|
||||
| Lenovo IdeaPad Z510 | `<nixos-hardware/lenovo/ideapad/z510>` |
|
||||
| Lenovo ThinkPad T410 | `<nixos-hardware/lenovo/thinkpad/t410>` |
|
||||
| Lenovo ThinkPad T430 | `<nixos-hardware/lenovo/thinkpad/t430>` |
|
||||
| Lenovo ThinkPad T440p | `<nixos-hardware/lenovo/thinkpad/t440p>` |
|
||||
| Lenovo ThinkPad T450s | `<nixos-hardware/lenovo/thinkpad/t450s>` |
|
||||
| Lenovo ThinkPad T460s | `<nixos-hardware/lenovo/thinkpad/t460s>` |
|
||||
| Lenovo ThinkPad X140e | `<nixos-hardware/lenovo/thinkpad/x140e>` |
|
||||
| Lenovo ThinkPad X220 | `<nixos-hardware/lenovo/thinkpad/x220>` |
|
||||
| Lenovo ThinkPad X230 | `<nixos-hardware/lenovo/thinkpad/x230>` |
|
||||
| Lenovo ThinkPad X250 | `<nixos-hardware/lenovo/thinkpad/x250>` |
|
||||
| [Lenovo ThinkPad X260][] | `<nixos-hardware/lenovo/thinkpad/x260>` |
|
||||
| Lenovo ThinkPad X270 | `<nixos-hardware/lenovo/thinkpad/x270>` |
|
||||
| [Lenovo ThinkPad X1 (6th Gen)][] | `<nixos-hardware/lenovo/thinkpad/x1/6th-gen>`|
|
||||
| [Microsoft Surface Pro 3][] | `<nixos-hardware/microsoft/surface-pro/3>` |
|
||||
| PC Engines APU | `<nixos-hardware/pcengines/apu>` |
|
||||
| [Raspberry Pi 2][] | `<nixos-hardware/raspberry-pi/2>` |
|
||||
| [Samsung Series 9 NP900X3C][] | `<nixos-hardware/samsung/np900x3c>` |
|
||||
| [Purism Librem 13v3][] | `<nixos-hardware/purism/librem/13v3>` |
|
||||
| Supermicro A1SRi-2758F | `<nixos-hardware/supermicro/a1sri-2758f>` |
|
||||
| Supermicro X10SLL-F | `<nixos-hardware/supermicro/x10sll-f>` |
|
||||
| [Toshiba Chromebook 2 `swanky`][] | `<nixos-hardware/toshiba/swanky>` |
|
||||
## Using nix flakes support
|
||||
|
||||
There is also experimental flake support. In your `/etc/nixos/flake.nix` add the following:
|
||||
|
||||
```nix
|
||||
{
|
||||
description = "NixOS configuration with flakes";
|
||||
inputs.nixos-hardware.url = github:NixOS/nixos-hardware/master;
|
||||
|
||||
outputs = { self, nixpkgs, nixos-hardware }: {
|
||||
# replace <your-hostname> with your actual hostname
|
||||
nixosConfigurations.<your-hostname> = nixpkgs.lib.nixosSystem {
|
||||
# ...
|
||||
modules = [
|
||||
# ...
|
||||
# add your model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix
|
||||
nixos-hardware.nixosModules.dell-xps-13-9380
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Using fetchGit
|
||||
|
||||
You can fetch the git repository directly:
|
||||
|
||||
```nix
|
||||
imports = [
|
||||
"${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/lenovo/thinkpad/x220"
|
||||
];
|
||||
```
|
||||
|
||||
Unlike the channel, this will update the git repository on a rebuild. However,
|
||||
you can easily pin to a particular revision if you desire more stability.
|
||||
|
||||
## List of Profiles
|
||||
|
||||
See code for all available configurations.
|
||||
|
||||
| Model | Path |
|
||||
| --------------------------------- | -------------------------------------------------- |
|
||||
| [Acer Aspire 4810T][] | `<nixos-hardware/acer/aspire/4810t>` |
|
||||
| Airis N990 | `<nixos-hardware/airis/n990>` |
|
||||
| Apple MacBook Air 3,X | `<nixos-hardware/apple/macbook-air/3>` |
|
||||
| Apple MacBook Air 4,X | `<nixos-hardware/apple/macbook-air/4>` |
|
||||
| Apple MacBook Air 6,X | `<nixos-hardware/apple/macbook-air/6>` |
|
||||
| [Apple MacBook Pro 10,1][] | `<nixos-hardware/apple/macbook-pro/10-1>` |
|
||||
| Apple MacBook Pro 12,1 | `<nixos-hardware/apple/macbook-pro/12-1>` |
|
||||
| Asus TUF FX504GD | `<nixos-hardware/asus/fx504gd>` |
|
||||
| BeagleBoard PocketBeagle | `<nixos-hardware/beagleboard/pocketbeagle>` |
|
||||
| [Dell G3 3779][] | `<nixos-hardware/dell/g3/3779>` |
|
||||
| Dell Latitude 3480 | `<nixos-hardware/dell/latitude/3480>` |
|
||||
| Dell Precision 5530 | `<nixos-hardware/dell/precision/5530>` |
|
||||
| [Dell XPS E7240][] | `<nixos-hardware/dell/e7240>` |
|
||||
| [Dell XPS 13 7390][] | `<nixos-hardware/dell/xps/13-7390>` |
|
||||
| [Dell XPS 13 9310][] | `<nixos-hardware/dell/xps/13-9310>` |
|
||||
| [Dell XPS 13 9343][] | `<nixos-hardware/dell/xps/13-9343>` |
|
||||
| [Dell XPS 13 9360][] | `<nixos-hardware/dell/xps/13-9360>` |
|
||||
| [Dell XPS 13 9370][] | `<nixos-hardware/dell/xps/13-9370>` |
|
||||
| [Dell XPS 13 9380][] | `<nixos-hardware/dell/xps/13-9380>` |
|
||||
| [Dell XPS 15 7590][] | `<nixos-hardware/dell/xps/15-7590>` |
|
||||
| [Dell XPS 15 9550][] | `<nixos-hardware/dell/xps/15-9550>` |
|
||||
| [Dell XPS 15 9550, nvidia][] | `<nixos-hardware/dell/xps/15-9550/nvidia>` |
|
||||
| [Dell XPS 15 9560][] | `<nixos-hardware/dell/xps/15-9560>` |
|
||||
| [Dell XPS 15 9560, intel only][] | `<nixos-hardware/dell/xps/15-9560/intel>` |
|
||||
| [Dell XPS 15 9560, nvidia only][] | `<nixos-hardware/dell/xps/15-9560/nvidia>` |
|
||||
| [Dell XPS 15 9500][] | `<nixos-hardware/dell/xps/15-9500>` |
|
||||
| [Dell XPS 15 9500, nvidia][] | `<nixos-hardware/dell/xps/15-9500/nvidia>` |
|
||||
| [Google Pixelbook][] | `<nixos-hardware/google/pixelbook>` |
|
||||
| [Inverse Path USB armory][] | `<nixos-hardware/inversepath/usbarmory>` |
|
||||
| Lenovo IdeaPad Z510 | `<nixos-hardware/lenovo/ideapad/z510>` |
|
||||
| Lenovo ThinkPad E470 | `<nixos-hardware/lenovo/thinkpad/e470>` |
|
||||
| Lenovo ThinkPad E495 | `<nixos-hardware/lenovo/thinkpad/e495>` |
|
||||
| Lenovo ThinkPad L13 | `<nixos-hardware/lenovo/thinkpad/l13>` |
|
||||
| Lenovo ThinkPad L14 (Intel) | `<nixos-hardware/lenovo/thinkpad/l14/intel> |
|
||||
| Lenovo ThinkPad L14 (AMD) | `<nixos-hardware/lenovo/thinkpad/l14/amd> |
|
||||
| Lenovo ThinkPad P53 | `<nixos-hardware/lenovo/thinkpad/p53>` |
|
||||
| Lenovo ThinkPad T14 | `<nixos-hardware/lenovo/thinkpad/t14>` |
|
||||
| Lenovo ThinkPad T14 AMD Gen 1 | `<nixos-hardware/lenovo/thinkpad/t14/amd/gen1>` |
|
||||
| Lenovo ThinkPad T14s | `<nixos-hardware/lenovo/thinkpad/t14s>` |
|
||||
| Lenovo ThinkPad T14s AMD Gen 1 | `<nixos-hardware/lenovo/thinkpad/t14s/amd/gen1>` |
|
||||
| Lenovo ThinkPad T410 | `<nixos-hardware/lenovo/thinkpad/t410>` |
|
||||
| Lenovo ThinkPad T420 | `<nixos-hardware/lenovo/thinkpad/t420>` |
|
||||
| Lenovo ThinkPad T430 | `<nixos-hardware/lenovo/thinkpad/t430>` |
|
||||
| Lenovo ThinkPad T440s | `<nixos-hardware/lenovo/thinkpad/t440s>` |
|
||||
| Lenovo ThinkPad T440p | `<nixos-hardware/lenovo/thinkpad/t440p>` |
|
||||
| Lenovo ThinkPad T450s | `<nixos-hardware/lenovo/thinkpad/t450s>` |
|
||||
| Lenovo ThinkPad T460 | `<nixos-hardware/lenovo/thinkpad/t460>` |
|
||||
| Lenovo ThinkPad T460s | `<nixos-hardware/lenovo/thinkpad/t460s>` |
|
||||
| Lenovo ThinkPad T470s | `<nixos-hardware/lenovo/thinkpad/t470s>` |
|
||||
| Lenovo ThinkPad T480s | `<nixos-hardware/lenovo/thinkpad/t480s>` |
|
||||
| Lenovo ThinkPad T490 | `<nixos-hardware/lenovo/thinkpad/t490>` |
|
||||
| Lenovo ThinkPad T495 | `<nixos-hardware/lenovo/thinkpad/t495>` |
|
||||
| Lenovo ThinkPad X113 Yoga | `<nixos-hardware/lenovo/thinkpad/x13-yoga>` |
|
||||
| Lenovo ThinkPad X140e | `<nixos-hardware/lenovo/thinkpad/x140e>` |
|
||||
| Lenovo ThinkPad X200s | `<nixos-hardware/lenovo/thinkpad/x200s>` |
|
||||
| Lenovo ThinkPad X220 | `<nixos-hardware/lenovo/thinkpad/x220>` |
|
||||
| Lenovo ThinkPad X230 | `<nixos-hardware/lenovo/thinkpad/x230>` |
|
||||
| Lenovo ThinkPad X250 | `<nixos-hardware/lenovo/thinkpad/x250>` |
|
||||
| [Lenovo ThinkPad X260][] | `<nixos-hardware/lenovo/thinkpad/x260>` |
|
||||
| Lenovo ThinkPad X270 | `<nixos-hardware/lenovo/thinkpad/x270>` |
|
||||
| Lenovo ThinkPad X280 | `<nixos-hardware/lenovo/thinkpad/x280>` |
|
||||
| [Lenovo ThinkPad X1 (6th Gen)][] | `<nixos-hardware/lenovo/thinkpad/x1/6th-gen>` |
|
||||
| [Lenovo ThinkPad X1 (7th Gen)][] | `<nixos-hardware/lenovo/thinkpad/x1/7th-gen>` |
|
||||
| Lenovo ThinkPad X1 Extreme Gen 2 | `<nixos-hardware/lenovo/thinkpad/x1-extreme/gen2>` |
|
||||
| [Lenovo ThinkPad X13][] | `<nixos-hardware/lenovo/thinkpad/x13` |
|
||||
| [Microsoft Surface Range][] | `<nixos-hardware/microsoft/surface>` |
|
||||
| [Microsoft Surface Pro 3][] | `<nixos-hardware/microsoft/surface-pro/3>` |
|
||||
| [MSI GS60 2QE][] | `<nixos-hardware/msi/gs60>` |
|
||||
| PC Engines APU | `<nixos-hardware/pcengines/apu>` |
|
||||
| [Raspberry Pi 2][] | `<nixos-hardware/raspberry-pi/2>` |
|
||||
| [Raspberry Pi 4][] | `<nixos-hardware/raspberry-pi/4>` |
|
||||
| [Samsung Series 9 NP900X3C][] | `<nixos-hardware/samsung/np900x3c>` |
|
||||
| [Purism Librem 13v3][] | `<nixos-hardware/purism/librem/13v3>` |
|
||||
| [Purism Librem 15v3][] | `<nixos-hardware/purism/librem/15v3>` |
|
||||
| Supermicro A1SRi-2758F | `<nixos-hardware/supermicro/a1sri-2758f>` |
|
||||
| Supermicro X10SLL-F | `<nixos-hardware/supermicro/x10sll-f>` |
|
||||
| [System76 (generic)][] | `<nixos-hardware/system76>` |
|
||||
| [System76 Darter Pro 6][] | `<nixos-hardware/system76/darp6>` |
|
||||
| [Toshiba Chromebook 2 `swanky`][] | `<nixos-hardware/toshiba/swanky>` |
|
||||
| [Tuxedo InfinityBook v4][] | `<nixos-hardware/tuxedo/infinitybook/v4>` |
|
||||
|
||||
[Acer Aspire 4810T]: acer/aspire/4810t
|
||||
[Asus TUF FX504GD]: asus/fx504gd
|
||||
[Apple MacBook Pro 10,1]: apple/macbook-pro/10-1
|
||||
[Dell G3 3779]: dell/g3/3779
|
||||
[Dell XPS E7240]: dell/e7240
|
||||
[Dell XPS 13 7390]: dell/xps/13-7390
|
||||
[Dell XPS 13 9343]: dell/xps/13-9343
|
||||
[Dell XPS 13 9310]: dell/xps/13-9310
|
||||
[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]: dell/xps/15-7590
|
||||
[Dell XPS 15 9550]: dell/xps/15-9550
|
||||
[Dell XPS 15 9560]: dell/xps/15-9560
|
||||
[Dell XPS 15 9560, intel only]: dell/xps/15-9560/intel
|
||||
[Dell XPS 15 9560, nvidia only]: dell/xps/15-9560/nvidia
|
||||
[Google Pixelbook]: google/pixelbook
|
||||
[Inverse Path USB armory]: inversepath/usbarmory
|
||||
[Lenovo ThinkPad X1 (6th Gen)]: lenovo/thinkpad/x1/6th-gen
|
||||
[Lenovo ThinkPad X1 (7th Gen)]: lenovo/thinkpad/x1/7th-gen
|
||||
[Lenovo ThinkPad X13]: lenovo/thinkpad/x13
|
||||
[Lenovo ThinkPad X13 Yoga]: lenovo/thinkpad/x13-yoga
|
||||
[Lenovo ThinkPad X260]: lenovo/thinkpad/x260
|
||||
[Microsoft Surface Pro 3]: microsoft/surface-pro/3
|
||||
[MSI GS60 2QE]: msi/gs60
|
||||
[Raspberry Pi 2]: raspberry-pi/2
|
||||
[Samsung Series 9 NP900X3C]: samsung/np900x3c
|
||||
[System76 (generic)]: system76
|
||||
[System76 Darter Pro 6]: system76/darp6
|
||||
[Purism Librem 13v3]: purism/librem/13v3
|
||||
[Purism Librem 15v5]: purism/librem/15v5
|
||||
[Toshiba Chromebook 2 `swanky`]: toshiba/swanky
|
||||
[Tuxedo InfinityBook v4]: nixos-hardware/tuxedo/infinitybook/v4
|
||||
|
||||
## How to contribute a new device profile
|
||||
|
||||
1. Add your device profile expression in the appropriate directory
|
||||
2. Link it in the table in README.md and in flake.nix
|
||||
3. Run ./tests/run.py to test it. The test script script will parse all the profiles from the README.md
|
||||
@@ -0,0 +1,11 @@
|
||||
## Switching Cmd and Alt/AltGr
|
||||
|
||||
This will switch the left Alt and Cmd key as well as the right Alt/AltGr and Cmd key.
|
||||
|
||||
```nix
|
||||
boot.kernelParams = [
|
||||
"hid_apple.swap_opt_cmd=1"
|
||||
];
|
||||
```
|
||||
|
||||
Reference: https://wiki.archlinux.org/index.php/Apple_Keyboard#Switching_Cmd_and_Alt/AltGr
|
||||
@@ -0,0 +1,15 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../.
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
|
||||
# Built-in iSight is recognized by the generic uvcvideo kernel module
|
||||
hardware.facetimehd.enable = false;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# MacBook Pro 12,1
|
||||
|
||||
## Wireless won't get reconnected after resume/hibernate
|
||||
|
||||
The wifi driver is unloaded before suspend/hibernate to workaround driver issues.
|
||||
This means it might be required to restart your wifi deamon i.e. wpa_supplicant:
|
||||
|
||||
```nix
|
||||
powerManagement.powerUpCommands = ''
|
||||
${pkgs.systemd}/bin/systemctl restart wpa_supplicant.service
|
||||
'';
|
||||
};
|
||||
```
|
||||
|
||||
You can apply this to your network management software of choice.
|
||||
@@ -1,12 +1,24 @@
|
||||
{ lib, ... }:
|
||||
{ lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop/ssd
|
||||
<nixpkgs/nixos/modules/hardware/network/broadcom-43xx.nix>
|
||||
"${modulesPath}/hardware/network/broadcom-43xx.nix"
|
||||
];
|
||||
|
||||
powerManagement = {
|
||||
# Enable gradually increasing/decreasing CPU frequency, rather than using
|
||||
# "powersave", which would keep CPU frequency at 0.8GHz.
|
||||
cpuFreqGovernor = lib.mkDefault "conservative";
|
||||
|
||||
# brcmfmac being loaded during hibernation would not let a successful resume
|
||||
# https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116.
|
||||
# Also brcmfmac could randomly crash on resume from sleep.
|
||||
powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac";
|
||||
powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac";
|
||||
};
|
||||
|
||||
# USB subsystem wakes up MBP right after suspend unless we disable it.
|
||||
services.udev.extraRules = lib.mkDefault ''
|
||||
SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common/cpu/intel
|
||||
../../common/pc/laptop
|
||||
];
|
||||
|
||||
#Nouveau doesn't work at all on this model.
|
||||
boot.kernelParams = [ "nouveau.modeset=0" ];
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
amdvlk
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
driSupport = lib.mkDefault true;
|
||||
driSupport32Bit = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
# Explicitly set amdgpu support in place of radeon
|
||||
boot.kernelParams = [ "radeon.cik_support=0" "amdgpu.cik_support=1" ];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
# Explicitly set amdgpu support in place of radeon
|
||||
boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# This runs only Intel and nvidia does not drain power.
|
||||
|
||||
##### disable nvidia, very nice battery life.
|
||||
hardware.nvidiaOptimus.disable = lib.mkDefault true;
|
||||
boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" ];
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "intel" ];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
# This creates a new 'nvidia-offload' program that runs the application passed to it on the GPU
|
||||
# As per https://nixos.wiki/wiki/Nvidia
|
||||
let
|
||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
exec -a "$0" "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||
environment.systemPackages = [ nvidia-offload ];
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
offload.enable = lib.mkDefault true;
|
||||
# Hardware should specify the bus ID for intel/nvidia devices
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
{ lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
|
||||
"ath3k"
|
||||
];
|
||||
|
||||
services.xserver.libinput.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Temporary fix for cpu throttling issues visible in the kernel log
|
||||
# (journalctl -k) by setting the same temperature limits used by
|
||||
# Window$
|
||||
# See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues
|
||||
systemd.services.cpu-throttling = {
|
||||
enable = true;
|
||||
description = "Sets the offset to 3 °C, so the new trip point is 97 °C";
|
||||
documentation = [
|
||||
"https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues"
|
||||
];
|
||||
path = [ pkgs.msr-tools ];
|
||||
script = "wrmsr -a 0x1a2 0x3000000";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
wantedBy = [
|
||||
"timers.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.timers.cpu-throttling = {
|
||||
enable = true;
|
||||
description = "Set cpu heating limit to 97 °C";
|
||||
documentation = [
|
||||
"https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues"
|
||||
];
|
||||
timerConfig = {
|
||||
OnActiveSec = 60;
|
||||
OnUnitActiveSec = 60;
|
||||
Unit = "cpu-throttling.service";
|
||||
};
|
||||
wantedBy = [
|
||||
"timers.target"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -3,11 +3,5 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
# TODO: fix in NixOS/nixpkgs
|
||||
# Disable governor set in hardware-configuration.nix,
|
||||
# required when services.tlp.enable is true:
|
||||
powerManagement.cpuFreqGovernor =
|
||||
lib.mkIf config.services.tlp.enable (lib.mkForce null);
|
||||
|
||||
services.tlp.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -4,4 +4,6 @@
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = lib.mkDefault 1;
|
||||
};
|
||||
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
}
|
||||
+3
-52
@@ -1,52 +1,3 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
shim = {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
buildProfile = profile: (import <nixpkgs/nixos> {
|
||||
configuration.imports = [ profile shim ];
|
||||
}).system;
|
||||
in
|
||||
|
||||
{
|
||||
acer-aspire-4810t = buildProfile ./acer/aspire/4810t;
|
||||
|
||||
airis-n990 = buildProfile ./airis/n990;
|
||||
|
||||
apple-macbook-air-4 = buildProfile ./apple/macbook-air/4;
|
||||
apple-macbook-air-6 = buildProfile ./apple/macbook-air/6;
|
||||
apple-macbook-pro-10-1 = buildProfile ./apple/macbook-pro/10-1;
|
||||
apple-macbook-pro-11-5 = buildProfile ./apple/macbook-pro/11-5;
|
||||
apple-macbook-pro-12-1 = buildProfile ./apple/macbook-pro/12-1;
|
||||
|
||||
dell-xps-13-9370 = buildProfile ./dell/xps/13-9370;
|
||||
dell-xps-15-9550 = buildProfile ./dell/xps/15-9550;
|
||||
|
||||
lenovo-thinkpad-t410 = buildProfile ./lenovo/thinkpad/t410;
|
||||
lenovo-thinkpad-t440p = buildProfile ./lenovo/thinkpad/t440p;
|
||||
lenovo-thinkpad-t450s = buildProfile ./lenovo/thinkpad/t450s;
|
||||
lenovo-thinkpad-t460s = buildProfile ./lenovo/thinkpad/t460s;
|
||||
lenovo-thinkpad-x140e = buildProfile ./lenovo/thinkpad/x140e;
|
||||
lenovo-thinkpad-x220 = buildProfile ./lenovo/thinkpad/x220;
|
||||
lenovo-thinkpad-x230 = buildProfile ./lenovo/thinkpad/x230;
|
||||
lenovo-thinkpad-x250 = buildProfile ./lenovo/thinkpad/x250;
|
||||
lenovo-thinkpad-x260 = buildProfile ./lenovo/thinkpad/x260;
|
||||
|
||||
microsoft-surface-pro-3 = buildProfile ./microsoft/surface-pro/3;
|
||||
|
||||
pcengines-apu = buildProfile ./pcengines/apu;
|
||||
|
||||
toshiba-swanky = buildProfile ./toshiba/swanky;
|
||||
}
|
||||
# This file is necessary so nix-env -qa does not break,
|
||||
# when nixos-hardware is used as a channel
|
||||
{}
|
||||
@@ -0,0 +1,8 @@
|
||||
On some kernel versions user ashgillman has experiences suspend issues
|
||||
(see https://bugzilla.redhat.com/show_bug.cgi?id=1597481).
|
||||
|
||||
Try:
|
||||
|
||||
```nix
|
||||
boot.kernelPackages = pkgs.linuxPackages_4_14;
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../common/cpu/intel
|
||||
../../common/pc/laptop
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/gpu/nvidia.nix
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# Specify bus id of Nvidia and Intel graphics
|
||||
hardware.nvidia.prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
|
||||
# Cooling management
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
|
||||
# Use same ACPI identifier as Dell Ubuntu
|
||||
boot.kernelParams = [
|
||||
"acpi_osi=Linux-Dell-Video"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# touchpad goes over i2c
|
||||
boot.blacklistedKernelModules = [ "psmouse" ];
|
||||
|
||||
services.xserver.videoDrivers = lib.mkDefault [ "intel" ];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803179/comments/149
|
||||
# fix lspci hanging with nouveau
|
||||
boot.kernelParams = [
|
||||
"acpi_rev_override=1"
|
||||
"acpi_osi=Linux"
|
||||
"nouveau.modeset=0"
|
||||
"pcie_aspm=force"
|
||||
"drm.vblankoffdelay=1"
|
||||
"scsi_mod.use_blk_mq=1"
|
||||
"nouveau.runpm=0"
|
||||
"mem_sleep_default=deep"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
= Dell XPS 13 7390 =
|
||||
|
||||
== Installation ==
|
||||
|
||||
You need to disable RAID and use AHCI instead as described [https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1 here].
|
||||
|
||||
== Firmware upgrades ==
|
||||
|
||||
Note that this device is supported by [https://fwupd.org/ fwupd].
|
||||
To perform firmware upgrades just activate the service
|
||||
|
||||
<code>
|
||||
services.fwupd.enable = true;
|
||||
</code>
|
||||
|
||||
Then use <code>fwupdmgr</code> to perform updates.
|
||||
@@ -0,0 +1,17 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
||||
|
||||
# older version break wifi:
|
||||
# - https://github.com/NixOS/nixos-hardware/issues/173
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest;
|
||||
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
imports = [ ../../../common/cpu/intel ../../../common/pc/laptop ];
|
||||
|
||||
# Includes the Wi-Fi and Bluetooth firmware for the QCA6390.
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Wi-Fi currently requires a specific set of patches to function.
|
||||
# To ensure these patches do not conflict, we pin to a specific version here.
|
||||
# TODO: Remove this once patches have finally landed in mainline.
|
||||
boot.kernelPackages = let
|
||||
linux_patched_pkg =
|
||||
{ buildLinux, fetchurl, modDirVersionArg ? null, ... }@args:
|
||||
buildLinux (args // rec {
|
||||
version = "5.10.18";
|
||||
modDirVersion = if (modDirVersionArg == null) then
|
||||
builtins.replaceStrings [ "-" ] [ ".0-" ] version
|
||||
else
|
||||
modDirVersionArg;
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "04dnkg5j73f6cd8ws1prrrjx37srz7rm66bj6slmnfzp3cmyxh9v";
|
||||
};
|
||||
|
||||
# kvalo qca6390 patches
|
||||
# https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/log/?h=ath11k-qca6390-bringup
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "add-64-bit-check-before-reading-msi-high-addr";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=065c9528cc508cfbf6e3399582df29f76f56163c";
|
||||
sha256 = "1mqhwags919vlxllzqh5kj4b2l869swvfwa89jk804a1l4l02fmv";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "pci-support-platforms-with-one-msi-vector";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=59c6d022df8efb450f82d33dd6a6812935bd022f";
|
||||
sha256 = "0sxbb58bnryb9hic1cyc8dzrzachhca7a6hywyzz1pksh9syhs5y";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "fix-monitor-status-dma-unmap-direction";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=fa4eea695afb286ae38beb30dabf251335cb4a62";
|
||||
sha256 = "1sh3d8ck4nlg671j2y8f07394xrqlnbrvh9rmy4l1zfpz7wa7d10";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "hook-mhi-suspend-and-resume";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=762fe5bc2dd1e43ef307a375861b1a8c414b14e3";
|
||||
sha256 = "154p8gp4smmmkhyx127f6rib04xd5bn38a3n4893rbyyb5kckv40";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "implement-hif-suspend-and-resume-functions";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=2f164833bcca14e8aec0b2566eae4b5a7d09ee6f";
|
||||
sha256 = "1ic968y1ivlgfhbj67ds809zqas7n50kc6wb8jgksk227dvagnip";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "read-select_window-register-to-ensure-write-is-finished";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6afab932ece78fedc1538c20c2aefdd13aa6c9d0";
|
||||
sha256 = "19jiz9mf868rj57ljjdb3n97sfi6x78ac9kgd7fhg1bh0zjjiskp";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "implement-htc-suspend-related-callbacks";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=69ab2835b82c176e793195243e1400d4f8db3647";
|
||||
sha256 = "1gba5h0s6c6zjplw8zyqc2qj21ly1m2xzbgznml159wzj2xvzb2m";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "put-target-to-suspend-when-system-enters-suspend-state";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=68023bee4d61ea2b02af49bba00adabba51d8b6b";
|
||||
sha256 = "05aqdjd5xps0wncrh41r805fn2rpnhw53pn02a374g81bbifwa5q";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "pci-print-a-warning-if-firmware-crashed";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=23dcef9436560a033703164c4daff9e36e640969";
|
||||
sha256 = "0m45wvilr2cgdkpdjzcz4hdzsfs596ibjsvd7sdksjbrp5wslla1";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "qmi-print-allocated-memory-segment-addresses-and-sizes";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=a327caa4a5a677161a6f1d29514e8cb42236e956";
|
||||
sha256 = "1id6xz7siw1x2xa00psqvr4h5zb0xd83apy0cyv4jqzkd5x1kwl0";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "put-hw-to-dbs-using-mode";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=ce8b5dfc16a0b84ac9ab2d508c2d5e66e8bf179a";
|
||||
sha256 = "0gcnzn82mjdqy3ly494xfawqb9xvwd01dcdr43cw8ik92jggs4sf";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "fix-pcie-link-unstable-issue";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=a82a3aee7cde95d533c28cad3749e3c354011896";
|
||||
sha256 = "0r26g7j7kkm76bippp79vd462ykc8k8p0bxr7pshhkyazs6v1ij3";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "fix-pci-l1ss-clock-unstable-problem";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=08816aab67540e6babc558dafa973fc905a9afa1";
|
||||
sha256 = "180hp6iwgw7cqiiwhp9cnzwr5z9n26pphi2j693x751crzr0xkzw";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "disable-otp-write-privilege";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=86c5a1d6983e647a55448c80f94eb8f0aa97dfad";
|
||||
sha256 = "176g07kpsqnkc3vpfx2lhlrksmdg05m0zxn1i5yfvksczp2215iq";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "disable-aspm-l0sls-before-downloading-firmware";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=8bd374e3305359ca0be9fe88e8a1edc1abd537eb";
|
||||
sha256 = "1grjsf6jvn536cz6wil79l2lzc90ga1c7sisv9j0qac7jzr7x5rz";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "purge-rx-pktlog-when-entering-suspend";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6f481de563dd108bd3df616c80e60f308b7a48e3";
|
||||
sha256 = "14qd1qv8v3mcslj7crzrw0ib1caa7vbnq7jkq163248658bbmk6p";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "set-credit_update-flag-for-flow-controlled-ep-only";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6e0fba395a054cd58d87b3749f1f4ff2f3fef92e";
|
||||
sha256 = "0sgjxj6m3fdlgdfg7rv5fajfmbmrccy5asrammlgbc7gh5sn9ac4";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "implement-wow-enable-and-wow-wakeup-command";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=cfca935c92d8f2b31c95e7fd074645245f54492a";
|
||||
sha256 = "0dwbsqkw3f8v676s0x3jv04w0qk36ypvnwh02rx4qfdk38sh0j3j";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "add-ce-irq-enable-and-disable-hif-layer-functions";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=9297794a5d5af5e82b9554677f959add281a5b76";
|
||||
sha256 = "0hl93l8khh36drllxii969nvkb6p4hh28gnjyg0y10adm5q9b4ac";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "put-target-to-wow-state-when-suspend-happens";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=d448ef6decab05c499ffc005c56307a6fc1f1abe";
|
||||
sha256 = "17pgbmsryg96626xpbkzd0c27z71lsy7ygli4c6d4dzk5b9594zn";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "vdev-delete-sync-with-fw";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=c1d3ee50859a2d2c132a8461fdabde568df5ee20";
|
||||
sha256 = "1dscfdqv5x3h024gryh0464mky0j6z681rliiix17kdh172vxx52";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "peer-delete-sync-with-fw";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=6244933ddba318b36bb00c48eeb8d63a24a901c2";
|
||||
sha256 = "0p1663w0lik44gwyfzmxxiwnc3s9n3p46aappla8pbfk9wdgw86d";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "start-vdev-if-bss-peer-already-created";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=c58d077298d91c61c2466a50b58181a234474381";
|
||||
sha256 = "1462w29isnlfqs4bavzprhj48wbzvmwasbzh4djzfnsjm0ld7z90";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "hack-mhi-disable-m2-state";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=cdda596d45a99fed1fe74b0605de6b220c955c0b";
|
||||
sha256 = "0wfmaygzl8fav8lr67pjnhqskm6mh9ykcwqh71ijxvfn0kbq9fqg";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "hack-revert-place-pages-to-tail";
|
||||
patch = pkgs.fetchpatch {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/patch/?id=60fad49a69e7b2f896ce7b1ade4ed532227b8e22";
|
||||
sha256 = "0zhzjyym42r3rjwh55vk6p423lhz7555mb7xjqk63lczrsc221nm";
|
||||
};
|
||||
}
|
||||
|
||||
# Extra config required for Bluetooth.
|
||||
# NOTE: Should consider upstreaming this to the default nix config.
|
||||
# Especially the `SERIAL_DEV_BUS` and `SERIAL_DEV_CTRL_TTYPORT`
|
||||
# options, as these are the recommended defaults.
|
||||
{
|
||||
name = "enable-qca6390-bluetooth";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
BT_QCA m
|
||||
BT_HCIUART m
|
||||
BT_HCIUART_QCA y
|
||||
BT_HCIUART_SERDEV y
|
||||
SERIAL_DEV_BUS y
|
||||
SERIAL_DEV_CTRL_TTYPORT y
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
# Enable some extra kernel modules for QCA6390 bluetooth.
|
||||
kernelModules = [ "btqca" "hci_qca" "hci_uart" ];
|
||||
} // (args.argsOverride or { }));
|
||||
linux_patched = pkgs.callPackage linux_patched_pkg { };
|
||||
in pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_patched);
|
||||
|
||||
# Touchpad goes over i2c.
|
||||
# Without this we get errors in dmesg on boot and hangs when shutting down.
|
||||
boot.blacklistedKernelModules = [ "psmouse" ];
|
||||
|
||||
# Allows for updating firmware via `fwupdmgr`.
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -13,14 +13,7 @@
|
||||
efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
systemd-boot.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
hardware.firmware = lib.mkBefore [ pkgs.qca6174-firmware ];
|
||||
|
||||
# TODO: move to general HiDPI profile
|
||||
i18n.consoleFont = lib.mkDefault "latarcyrheb-sun32"; # 4K screen, use bigger console font
|
||||
|
||||
# TODO: upstream to NixOS/nixpkgs
|
||||
nixpkgs.overlays = [(final: previous: {
|
||||
qca6174-firmware = final.callPackage ./qca6174-firmware.nix {};
|
||||
})];
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${target}-firmware-${version}";
|
||||
version = "${branch}-00042";
|
||||
|
||||
branch = "4.4.1.c1";
|
||||
target = "QCA6174";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/kvalo/ath10k-firmware/raw/952afa4949cb34193040cd4e7441e1aee50ac731/${target}/hw3.0/${branch}/firmware-6.bin_RM.${version}-QCARMSWP-1";
|
||||
sha256 = "01vvz3qhqw5l3yilcqgk1spk4y9k4qy7na7a57cbl037r231szdh";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
install -D $src $out/lib/firmware/ath10k/${target}/hw3.0/firmware-6.bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Updated firmware for the qca6174 wireless chip";
|
||||
homepage = "https://github.com/kvalo/ath10k-firmware/tree/master/QCA6174/hw3.0";
|
||||
license = licenses.unfreeRedistributable;
|
||||
maintainers = with maintainers; [ yorickvp ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/cpu-throttling-bug.nix
|
||||
];
|
||||
|
||||
# Force S3 sleep mode. See README.wiki for details.
|
||||
@@ -13,4 +12,9 @@
|
||||
|
||||
# touchpad goes over i2c
|
||||
boot.blacklistedKernelModules = [ "psmouse" ];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
= Dell XPS 13 9380 =
|
||||
|
||||
== Firmware upgrades ==
|
||||
|
||||
Note that this device is supported by [https://fwupd.org/ fwupd].
|
||||
To perform firmware upgrades just activate the service
|
||||
|
||||
<code>
|
||||
services.fwupd.enable = true;
|
||||
</code>
|
||||
|
||||
Then use <code>fwupdmgr</code> to perform updates.
|
||||
|
||||
== Battery drain when sleeping ==
|
||||
|
||||
The laptop uses the S2 sleep mode by default instead of S3, which leads to
|
||||
draining a lot of battery during sleep.
|
||||
|
||||
See https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)#Power_Management
|
||||
and https://bugzilla.kernel.org/show_bug.cgi?id=199689#c3 for reference
|
||||
@@ -0,0 +1,18 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
# Force S3 sleep mode. See README.wiki for details.
|
||||
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
||||
|
||||
# touchpad goes over i2c
|
||||
boot.blacklistedKernelModules = [ "psmouse" ];
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
= Dell XPS 15 7590 =
|
||||
*Mostly copied from 15-9550
|
||||
|
||||
== Tested Hardware ==
|
||||
|
||||
* CPU: Intel(R) Core(TM) i9-9980HK
|
||||
* RAM: 32 GB
|
||||
* HDD: 1 TiB SSD
|
||||
* Screen: 15" 4k (3840✕2160)
|
||||
* Input: Touchscreen and trackpad.
|
||||
|
||||
== Firmware Configuration ==
|
||||
|
||||
Not much tweaking of NixOS itself was needed. But we currently cannot automate the firmware setup, so this must be done by hand.
|
||||
|
||||
=== Before installation ===
|
||||
|
||||
These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first.
|
||||
|
||||
* ''Disable Secure Boot (but keep UEFI Boot).'' Thankfully doing so is as easy as changing any other simple setting.
|
||||
|
||||
* ''Disable Intel hardware RAID and use AHCI instead.'' Intel doesn't seem to provide a working linux driver for this. (If you just have SSD it's pointless and just slows things down needlessly anyways.)
|
||||
|
||||
=== Wifi ===
|
||||
~~Wifi does not work with kernels older than 5.1 (firmware not present) or newer~~ (https://bbs.archlinux.org/viewtopic.php?id=247705)
|
||||
|
||||
Update: The 48.ucode causes the Killer wifi card to crash. The iwlfwifi-cc-a0-46.ucode works perfectly.
|
||||
default.nix contains an overlay that removes the offending ucode from the linux-firmware bundle.
|
||||
To use it one also needs to enable unfree firmware in their own configuration (<code>hardware.enableRedistributableFirmware = true;</code>)
|
||||
|
||||
```
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.grub = {
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_5_1;
|
||||
```
|
||||
Disable the `canTouchEfiVariables` after a boot or two to prevent NVRAM wearout.
|
||||
|
||||
|
||||
=== After installation ===
|
||||
|
||||
* ''Add systemd-boot to UEFI boot list.'' The (uneditable anyways) settings mapping drive UUIDs to HD* work fine.
|
||||
|
||||
=== Optional ===
|
||||
|
||||
* ''Update BIOS.'' According to Reddit, this helps with battery life.
|
||||
|
||||
=== Troubleshooting ===
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
|
||||
# Set to true for just the first run, then disable it.
|
||||
# boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
|
||||
# Load GPU drivers.
|
||||
# hardware.bumblebee.enable = lib.mkDefault true;
|
||||
|
||||
# High DPI for X users. 175 "looks reasonable" but I didn't do the actual DPI
|
||||
# calculation.
|
||||
# services.xserver.dpi = lib.mkDefault 175;
|
||||
|
||||
# Earlier font-size setup
|
||||
console.earlySetup = true;
|
||||
|
||||
# Prevent small EFI partiion from filling up
|
||||
boot.loader.grub.configurationLimit = 10;
|
||||
|
||||
# The 48.ucode causes the Killer wifi card to crash.
|
||||
# The iwlfwifi-cc-a0-46.ucode works perfectly
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
firmwareLinuxNonfree = super.firmwareLinuxNonfree.overrideAttrs (old: {
|
||||
src = super.fetchgit {
|
||||
url =
|
||||
"https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
|
||||
rev = "bf13a71b18af229b4c900b321ef1f8443028ded8";
|
||||
sha256 = "1dcaqdqyffxiadx420pg20157wqidz0c0ca5mrgyfxgrbh6a4mdj";
|
||||
};
|
||||
postInstall = ''
|
||||
rm $out/lib/firmware/iwlwifi-cc-a0-48.ucode
|
||||
'';
|
||||
outputHash = "0dq48i1cr8f0qx3nyq50l9w9915vhgpwmwiw3b4yhisbc3afyay4";
|
||||
});
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
= Dell XPS 15 9550 =
|
||||
|
||||
== Tested Hardware ==
|
||||
|
||||
* CPU: Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
|
||||
* RAM: 64 GB
|
||||
* HDD: 1 TiB SSD
|
||||
* Screen: 15" 4k (3840✕2160)
|
||||
* Graphics: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile], with Intel Graphics too.
|
||||
* Input: Touchscreen and trackpad.
|
||||
|
||||
== Notes ==
|
||||
|
||||
Also tested with Dell WD19TB Thunderbolt Dock.
|
||||
|
||||
== NVIDIA Offload ==
|
||||
|
||||
In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` function, for example:
|
||||
```
|
||||
nvidia-offload `nix-shell -p glxinfo --run 'glxgears'`
|
||||
```
|
||||
This is a short bash script that sets the proper environment variables and calls your command.
|
||||
@@ -0,0 +1,21 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
thermald-conf = ./thermald-conf.xml;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# Boot loader
|
||||
boot.kernelParams = lib.mkDefault [ "acpi_rev_override" ];
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
|
||||
# Thermald doesn't have a default config for the 9500 yet, the one in this repo
|
||||
# was generated with dptfxtract-static (https://github.com/intel/dptfxtract)
|
||||
services.thermald.configFile = lib.mkDefault thermald-conf;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../default.nix
|
||||
../../../../common/gpu/nvidia.nix
|
||||
];
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
# Bus ID of the Intel GPU.
|
||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
|
||||
# Bus ID of the NVIDIA GPU.
|
||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- BEGIN -->
|
||||
<ThermalConfiguration>
|
||||
<Platform>
|
||||
<Name> Auto generated </Name>
|
||||
<ProductName>XPS 15 9500</ProductName>
|
||||
<Preference>QUIET</Preference>
|
||||
<PPCC>
|
||||
<PowerLimitIndex>0</PowerLimitIndex>
|
||||
<PowerLimitMinimum>10000</PowerLimitMinimum>
|
||||
<PowerLimitMaximum>68000</PowerLimitMaximum>
|
||||
<TimeWindowMinimum>56000</TimeWindowMinimum>
|
||||
<TimeWindowMaximum>56000</TimeWindowMaximum>
|
||||
<StepSize>250</StepSize>
|
||||
</PPCC>
|
||||
<ThermalZones>
|
||||
<ThermalZone>
|
||||
<Type>auto_zone_0</Type>
|
||||
<TripPoints>
|
||||
<TripPoint>
|
||||
<SensorType>SEN2</SensorType>
|
||||
<Temperature>55000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
<TargetState>45000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN2</SensorType>
|
||||
<Temperature>57000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
<TargetState>40000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN2</SensorType>
|
||||
<Temperature>60000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
<TargetState>35000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN2</SensorType>
|
||||
<Temperature>64000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>3</SamplingPeriod>
|
||||
<TargetState>35000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN2</SensorType>
|
||||
<Temperature>68000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>3</SamplingPeriod>
|
||||
<TargetState>20000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN2</SensorType>
|
||||
<Temperature>70000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>3</SamplingPeriod>
|
||||
<TargetState>15000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
</TripPoints>
|
||||
</ThermalZone>
|
||||
<ThermalZone>
|
||||
<Type>auto_zone_1</Type>
|
||||
<TripPoints>
|
||||
<TripPoint>
|
||||
<SensorType>SEN5</SensorType>
|
||||
<Temperature>38000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
<TargetState>22000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN5</SensorType>
|
||||
<Temperature>39000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
<TargetState>17000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN5</SensorType>
|
||||
<Temperature>40000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>3</SamplingPeriod>
|
||||
<TargetState>12000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>SEN5</SensorType>
|
||||
<Temperature>41000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>3</SamplingPeriod>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
</TripPoints>
|
||||
</ThermalZone>
|
||||
<ThermalZone>
|
||||
<Type>auto_zone_2</Type>
|
||||
<TripPoints>
|
||||
<TripPoint>
|
||||
<SensorType>VIR1</SensorType>
|
||||
<Temperature>57000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>3</SamplingPeriod>
|
||||
<TargetState>15000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>VIR1</SensorType>
|
||||
<Temperature>60000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>3</SamplingPeriod>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
</TripPoints>
|
||||
</ThermalZone>
|
||||
<ThermalZone>
|
||||
<Type>auto_zone_3</Type>
|
||||
<TripPoints>
|
||||
<TripPoint>
|
||||
<SensorType>VIR2</SensorType>
|
||||
<Temperature>76000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
</TripPoints>
|
||||
</ThermalZone>
|
||||
<ThermalZone>
|
||||
<Type>auto_zone_4</Type>
|
||||
<TripPoints>
|
||||
<TripPoint>
|
||||
<SensorType>WRLS</SensorType>
|
||||
<Temperature>80000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
</TripPoints>
|
||||
</ThermalZone>
|
||||
<ThermalZone>
|
||||
<Type>auto_zone_5</Type>
|
||||
<TripPoints>
|
||||
<TripPoint>
|
||||
<SensorType>STG1</SensorType>
|
||||
<Temperature>66000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
<TargetState>19000000</TargetState>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
<TripPoint>
|
||||
<SensorType>STG1</SensorType>
|
||||
<Temperature>90000</Temperature>
|
||||
<Type>Passive</Type>
|
||||
<CoolingDevice>
|
||||
<Type>B0D4</Type>
|
||||
<SamplingPeriod>1</SamplingPeriod>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
</TripPoints>
|
||||
</ThermalZone>
|
||||
</ThermalZones>
|
||||
</Platform>
|
||||
</ThermalConfiguration>
|
||||
<!-- END -->
|
||||
@@ -5,12 +5,19 @@ Most of this I presume also applies to the XPS 13 1530, the 13" variant.
|
||||
== Tested Hardware ==
|
||||
|
||||
* CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
|
||||
* RAM: 16 GB
|
||||
* RAM: 32 GB
|
||||
* HDD: 512 GiB SSD
|
||||
* Screen: 15" 4k (3840✕2160)
|
||||
* Graphics: NVIDIA Corporation GM107M, with Intel Graphics too.
|
||||
* Input: Touchscreen and trackpad.
|
||||
|
||||
== NVIDIA Offload ==
|
||||
|
||||
In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` function, for example:
|
||||
```
|
||||
nvidia-offload `nix-shell -p glxinfo --run 'glxgears'`
|
||||
```
|
||||
This is a short bash script that sets the proper environment variables and calls your command.
|
||||
|
||||
== Firmware Configuration ==
|
||||
|
||||
|
||||
@@ -4,12 +4,14 @@
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
# To just use Intel integrated graphics with Intel's open source driver
|
||||
# ../../../common/gpu/nvidia-disable
|
||||
];
|
||||
|
||||
# TODO: boot loader
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
|
||||
# To just use Intel integrated graphics with Intel's open source driver
|
||||
# hardware.nvidiaOptimus.disable = true;
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../default.nix
|
||||
../../../../common/gpu/nvidia.nix
|
||||
];
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
# Bus ID of the Intel GPU.
|
||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
|
||||
# Bus ID of the NVIDIA GPU.
|
||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
= Dell XPS 15 9560 =
|
||||
|
||||
== Tested Hardware ==
|
||||
|
||||
* CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
|
||||
* RAM: 16 GB
|
||||
* HDD: 512 GiB SSD
|
||||
* Screen: 15.6" FHD(1920x1080) InfinityEdge
|
||||
* Graphics: NVIDIA Corporation GTX1050 4GB GDDR5, with Intel Graphics too.
|
||||
* Input: trackpad
|
||||
|
||||
|
||||
== Firmware Configuration ==
|
||||
|
||||
Not much tweaking of NixOS itself was needed. But we currently cannot automate the firmware setup, so this must be done by hand.
|
||||
|
||||
=== Before installation ===
|
||||
|
||||
These settings are needed both for booting the final install, and installer itself. Therefore, they must be done first.
|
||||
|
||||
* ''Disable Secure Boot (but keep UEFI Boot).'' Thakfully doing so is as easy as changing any other simple setting.
|
||||
|
||||
* ''Disable Intel hardware RAID and use AHCI instead.'' Intel doesn't seem to provide a working linux driver for this. (If you just have SSD it's pointless and just slows things down needlessly anyways.)
|
||||
|
||||
|
||||
=== After installation ===
|
||||
|
||||
* ''Add systemd-boot to UEFI boot list.'' The (uneditable anyways) settings mapping drive UUIDs to HD* work fine.
|
||||
|
||||
=== Optional ===
|
||||
|
||||
* ''Disable C-States.'' This is a processor idling thing. It seems to cause random crashes (Blank screen, no normal panic debug dump). Unfortunately, without it, the computer cannot be suspended. On the other hand, it doesn't seem to affect acpi's estimation of battery life when the computer is running with minimal load, but I haven't tested battery life in practice. I list it as optional as there's a tradeoff, and the crashes are rare enough one can probably get through installation just fine.
|
||||
|
||||
* ''Update BIOS.'' According to Reddit, this helps with battery life.
|
||||
|
||||
* ''Update Intel's Thunderbolt firmware.'' Without this, the Thunderbolt port will only work as power source, and not transfer data.
|
||||
|
||||
=== Troubleshooting ===
|
||||
|
||||
==== rcu_sched freezing problems ====
|
||||
|
||||
After a recent update my machine became unstable. X couldn't start and even running `lspci` would lock the machine. I'm not sure what the root cause was, but I found the fix here: https://wiki.archlinux.org/index.php/Dell_XPS_15_9560#Troubleshooting
|
||||
|
||||
TL;DR I added this line:
|
||||
I am leaving these params here, I haven't test these so use on your own risk.
|
||||
I am using different method to disable nvidia.
|
||||
("acpi_rev_override=1" param is save and I have been using it for a while now,
|
||||
no crashes.)
|
||||
|
||||
```
|
||||
boot.kernelParams = [ "acpi_rev_override=1" "pcie_aspm=off" "nouveau.modeset=0" ];
|
||||
```
|
||||
|
||||
Some more detail about the problem can be found here: https://bbs.archlinux.org/viewtopic.php?id=223056
|
||||
@@ -0,0 +1,24 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
./xps-common.nix
|
||||
];
|
||||
|
||||
# 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 = lib.mkDefault [ "intel" "nvidia" ];
|
||||
boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "bbswitch" ];
|
||||
boot.extraModulePackages = lib.mkDefault [ pkgs.linuxPackages.nvidia_x11 ];
|
||||
hardware.bumblebee.enable = lib.mkDefault true;
|
||||
hardware.bumblebee.pmMethod = lib.mkDefault "none";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../../common/cpu/intel
|
||||
../../../../common/pc/laptop
|
||||
../../../../common/gpu/nvidia-disable.nix
|
||||
../xps-common.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../../common/cpu/intel
|
||||
../../../../common/pc/laptop
|
||||
../xps-common.nix
|
||||
];
|
||||
|
||||
|
||||
# This runs only nvidia, great for games or heavy use of render applications
|
||||
|
||||
##### disable intel, run nvidia only and as default
|
||||
services.xserver.videoDrivers = lib.mkDefault ["nvidia"];
|
||||
hardware.nvidia.modesetting.enable = lib.mkDefault true;
|
||||
hardware.nvidia.optimus_prime.enable = lib.mkDefault true;
|
||||
hardware.nvidia.optimus_prime.nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
hardware.nvidia.optimus_prime.intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
# Boot loader
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
boot.kernelParams = lib.mkDefault [ "acpi_rev_override" ];
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
{
|
||||
description = "nixos-hardware";
|
||||
|
||||
outputs = { self }: {
|
||||
nixosModules = {
|
||||
dell-aspire-4810t = import ./acer/aspire/4810t;
|
||||
asus-fx504gd = import ./asus/fx504gd;
|
||||
apple-macbook-air-3 = import ./apple/macbook-air/3;
|
||||
apple-macbook-air-4 = import apple/macbook-air/4;
|
||||
apple-macbook-air-6 = import apple/macbook-air/6;
|
||||
apple-macbook-pro-10-1 = import ./apple/macbook-pro/10-1;
|
||||
apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1;
|
||||
beagleboard-pocketbeagle = import ./beagleboard/pocketbeagle;
|
||||
dell-g3-3779 = import ./dell/g3/3779;
|
||||
dell-latitude-3480 = import ./dell/latitude/3480;
|
||||
dell-precision-5530 = import ./dell/precision/5530;
|
||||
dell-e7240 = import ./dell/e7240;
|
||||
dell-xps-13-7390 = import ./dell/xps/13-7390;
|
||||
dell-xps-13-9310 = import ./dell/xps/13-9310;
|
||||
dell-xps-13-9343 = import ./dell/xps/13-9343;
|
||||
dell-xps-13-9360 = import ./dell/xps/13-9360;
|
||||
dell-xps-13-9370 = import ./dell/xps/13-9370;
|
||||
dell-xps-13-9380 = import ./dell/xps/13-9380;
|
||||
dell-xps-15-7590 = import ./dell/xps/15-7590;
|
||||
dell-xps-15-9550 = import ./dell/xps/15-9550;
|
||||
dell-xps-15-9550-nvidia = import ./dell/xps/15-9550/nvidia;
|
||||
dell-xps-15-9560 = import ./dell/xps/15-9560;
|
||||
dell-xps-15-9560-intel = import ./dell/xps/15-9560/intel;
|
||||
dell-xps-15-9560-nvidia = import ./dell/xps/15-9560/nvidia;
|
||||
dell-xps-15-9500 = import ./dell/xps/15-9500;
|
||||
dell-xps-15-9500-nvidia = import ./dell/xps/15-9500/nvidia;
|
||||
google-pixelbook = import ./google/pixelbook;
|
||||
inversepath-usbarmory = import ./inversepath/usbarmory;
|
||||
lenovo-ideapad-z510 = import ./lenovo/ideapad/z510;
|
||||
lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470;
|
||||
lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495;
|
||||
lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13;
|
||||
lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel;
|
||||
lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd;
|
||||
lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53;
|
||||
lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14;
|
||||
lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1;
|
||||
lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s;
|
||||
lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1;
|
||||
lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410;
|
||||
lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420;
|
||||
lenovo-thinkpad-t430 = import ./lenovo/thinkpad/t430;
|
||||
lenovo-thinkpad-t440s = import ./lenovo/thinkpad/t440s;
|
||||
lenovo-thinkpad-t440p = import ./lenovo/thinkpad/t440p;
|
||||
lenovo-thinkpad-t450s = import ./lenovo/thinkpad/t450s;
|
||||
lenovo-thinkpad-t460 = import ./lenovo/thinkpad/t460;
|
||||
lenovo-thinkpad-t460s = import ./lenovo/thinkpad/t460s;
|
||||
lenovo-thinkpad-t470s = import ./lenovo/thinkpad/t470s;
|
||||
lenovo-thinkpad-t480s = import ./lenovo/thinkpad/t480s;
|
||||
lenovo-thinkpad-t490 = import ./lenovo/thinkpad/t490;
|
||||
lenovo-thinkpad-t495 = import ./lenovo/thinkpad/t495;
|
||||
lenovo-thinkpad-x140e = import ./lenovo/thinkpad/x140e;
|
||||
lenovo-thinkpad-x200s = import ./lenovo/thinkpad/x200s;
|
||||
lenovo-thinkpad-x220 = import ./lenovo/thinkpad/x220;
|
||||
lenovo-thinkpad-x230 = import ./lenovo/thinkpad/x230;
|
||||
lenovo-thinkpad-x250 = import ./lenovo/thinkpad/x250;
|
||||
lenovo-thinkpad-x260 = import ./lenovo/thinkpad/x260;
|
||||
lenovo-thinkpad-x270 = import ./lenovo/thinkpad/x270;
|
||||
lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280;
|
||||
lenovo-thinkpad-x1 = import ./lenovo/thinkpad/x1;
|
||||
lenovo-thinkpad-x1-6th-gen = import ./lenovo/thinkpad/x1/6th-gen;
|
||||
lenovo-thinkpad-x1-7th-gen = import ./lenovo/thinkpad/x1/7th-gen;
|
||||
lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme;
|
||||
lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2;
|
||||
lenovo-thinkpad-x13 = import ./lenovo/thinkpad/x13;
|
||||
lenovo-thinkpad-x13-yoga = import ./lenovo/thinkpad/x13-yoga;
|
||||
microsoft-surface = import ./microsoft/surface;
|
||||
microsoft-surface-pro-3 = import ./microsoft/surface-pro/3;
|
||||
pcengines-apu = import ./pcengines/apu;
|
||||
raspberry-pi-2 = import ./raspberry-pi/2;
|
||||
raspberry-pi-4 = import ./raspberry-pi/4;
|
||||
samsung-np900x3c = import ./samsung/np900x3c;
|
||||
system76 = import ./system76;
|
||||
system76-darp6 = import ./system76/darp6;
|
||||
purism-librem-13v3 = import ./purism/librem/13v3;
|
||||
purism-librem-15v3 = import ./purism/librem/15v3;
|
||||
supermicro-a1sri-2758f = import ./supermicro/a1sri-2758f;
|
||||
supermicro-x10sll-f = import ./supermicro/x10sll-f;
|
||||
thoshiba-swanky = import ./toshiba/swanky;
|
||||
tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4;
|
||||
common-cpu-amd = import ./common/cpu/amd;
|
||||
common-cpu-intel = import ./common/cpu/intel;
|
||||
common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake;
|
||||
common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge;
|
||||
common-gpu-nvidia = import ./common/gpu/nvidia.nix;
|
||||
common-gpu-nvidia-disable = import ./common/gpu/nvidia-disable.nix;
|
||||
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;
|
||||
common-pc-hdd = import ./common/pc/hdd;
|
||||
common-pc-laptop-hdd = import ./common/pc/laptop/hdd;
|
||||
common-pc-laptop-ssd = import ./common/pc/ssd;
|
||||
common-pc-laptop-acpi_call = import ./common/pc/laptop/acpi_call.nix;
|
||||
common-pc-laptop = import ./common/pc/laptop;
|
||||
common-pc-ssd = import ./common/pc/ssd;
|
||||
common-pc = import ./common/pc;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/cpu/intel/kaby-lake
|
||||
];
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../../common/pc/laptop ];
|
||||
|
||||
hardware.trackpoint.enable = lib.mkDefault true;
|
||||
hardware.trackpoint.emulateWheel = lib.mkDefault config.hardware.trackpoint.enable;
|
||||
|
||||
# Fingerprint reader: login and unlock with fingerprint (if you add one with `fprintd-enroll`)
|
||||
# services.fprintd.enable = true;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/gpu/nvidia.nix
|
||||
];
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
# Bus ID of the Intel GPU.
|
||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
|
||||
# Bus ID of the NVIDIA GPU.
|
||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/amd
|
||||
];
|
||||
|
||||
# see https://github.com/NixOS/nixpkgs/issues/69289
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ nixos, lib, pkgs, config, stdenv, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/cpu/amd
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
# With BIOS version 1.12 and the IOMMU enabled, the amdgpu driver
|
||||
# either crashes or is not able to attach to the GPU depending on
|
||||
# the kernel version. I've seen no issues with the IOMMU disabled.
|
||||
#
|
||||
# BIOS version 1.13 claims to fix IOMMU issues, but we leave the
|
||||
# IOMMU off to avoid a sad experience for those people that drew
|
||||
# the short straw when they bought their laptop.
|
||||
"iommu=off"
|
||||
];
|
||||
|
||||
# As of writing this, Linux 5.8 is the oldest kernel that is still
|
||||
# supported and has decent Renoir support.
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
# Force use of the thinkpad_acpi driver for backlight control.
|
||||
# This allows the backlight save/load systemd service to work.
|
||||
"acpi_backlight=native"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/cpu/intel
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ nixos, pkgs, lib, config, stdenv, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
t14s/
|
||||
@@ -0,0 +1,11 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/cpu/amd
|
||||
];
|
||||
|
||||
# For support of newer AMD GPUs, backlight and internal microphone
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
# For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI.
|
||||
# See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Suspend_issues
|
||||
|
||||
# Fingerprint sensor requires a firmware-update to work.
|
||||
|
||||
# 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" ];
|
||||
|
||||
# see https://github.com/NixOS/nixpkgs/issues/69289
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
# TODO: probably enable tcsd? Is this line necessary?
|
||||
kernelModules = [ "tpm-rng" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
}
|
||||
@@ -3,10 +3,7 @@
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
|
||||
# TODO: boot loader
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
}
|
||||
@@ -4,7 +4,8 @@
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/cpu-throttling-bug.nix
|
||||
../.
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ nixos, lib, pkgs, config, stdenv, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
|
||||
services = {
|
||||
# This fixes the pulseaudio profiles of the Thinkpad T490.
|
||||
# The laptop contains a single audio card with 5 sub-devices. Default pulseaudio only offers a single sink
|
||||
# which can only be switched between speaker/HDMI via a manual profile change.
|
||||
# This configures a profile set for pulseaudio which offers multiple sinks corresponding to the
|
||||
# speaker + 4 HDMI ports. This allows the user to play audio streams on the speaker and any of the 4 HDMI/USB-C
|
||||
# ports at the same time.
|
||||
udev.extraRules = let
|
||||
t490ProfileSet = ./t490-profile-set.conf;
|
||||
in ''
|
||||
SUBSYSTEM!="sound", GOTO="pulseaudio_end"
|
||||
ACTION!="change", GOTO="pulseaudio_end"
|
||||
KERNEL!="card*", GOTO="pulseaudio_end"
|
||||
|
||||
# Lenovo T490
|
||||
ATTRS{vendor}=="0x8086" ATTRS{device}=="0x9dc8" ATTRS{subsystem_vendor}=="0x17aa", ATTRS{subsystem_device}=="0x2279", ENV{PULSE_PROFILE_SET}="${t490ProfileSet}"
|
||||
|
||||
LABEL="pulseaudio_end"
|
||||
'';
|
||||
|
||||
throttled.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
[Profile speaker+hdmi-stereo]
|
||||
description = Speaker + HDMI Stereo
|
||||
output-mappings = analog-stereo hdmi-stereo hdmi-stereo-extra1 hdmi-stereo-extra2
|
||||
input-mappings = analog-stereo
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f
|
||||
channel-map = left,right
|
||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
|
||||
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
|
||||
priority = 15
|
||||
|
||||
[Mapping hdmi-stereo]
|
||||
description = Stereo (HDMI)
|
||||
device-strings = hdmi:%f
|
||||
paths-output = hdmi-output-0
|
||||
channel-map = left,right
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-stereo-extra1]
|
||||
description = Stereo (HDMI 2)
|
||||
device-strings = hdmi:%f,1
|
||||
paths-output = hdmi-output-1
|
||||
channel-map = left,right
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-stereo-extra2]
|
||||
description = Stereo (HDMI 3)
|
||||
device-strings = hdmi:%f,2
|
||||
paths-output = hdmi-output-2
|
||||
channel-map = left,right
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Profile speaker+hdmi-surround]
|
||||
description = Speaker + HDMI 5.1
|
||||
output-mappings = analog-stereo hdmi-surround hdmi-surround-extra1 hdmi-surround-extra2
|
||||
input-mappings = analog-stereo
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f
|
||||
channel-map = left,right
|
||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
|
||||
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
|
||||
priority = 15
|
||||
|
||||
[Mapping hdmi-surround]
|
||||
description = Digital Surround 5.1 (HDMI)
|
||||
device-strings = hdmi:%f
|
||||
paths-output = hdmi-output-0
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround-extra1]
|
||||
description = Digital Surround 5.1 (HDMI 2)
|
||||
device-strings = hdmi:%f,1
|
||||
paths-output = hdmi-output-1
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround-extra2]
|
||||
description = Digital Surround 5.1 (HDMI 3)
|
||||
device-strings = hdmi:%f,2
|
||||
paths-output = hdmi-output-2
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Profile speaker+hdmi-surround71]
|
||||
description = Speaker + HDMI 7.1
|
||||
output-mappings = analog-stereo hdmi-surround71 hdmi-surround71-extra1 hdmi-surround71-extra2
|
||||
input-mappings = analog-stereo
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f
|
||||
channel-map = left,right
|
||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
|
||||
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
|
||||
priority = 15
|
||||
|
||||
[Mapping hdmi-surround71]
|
||||
description = Digital Surround 7.1 (HDMI)
|
||||
device-strings = hdmi:%f
|
||||
paths-output = hdmi-output-0
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround71-extra1]
|
||||
description = Digital Surround 7.1 (HDMI 2)
|
||||
device-strings = hdmi:%f,1
|
||||
paths-output = hdmi-output-1
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround71-extra2]
|
||||
description = Digital Surround 7.1 (HDMI 3)
|
||||
device-strings = hdmi:%f,2
|
||||
paths-output = hdmi-output-2
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
priority = 6
|
||||
direction = output
|
||||
@@ -0,0 +1,16 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/amd
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
# 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" ];
|
||||
|
||||
# see https://github.com/NixOS/nixpkgs/issues/69289
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
];
|
||||
|
||||
# Fixes an issue with incorrect battery reporting. See
|
||||
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Extreme_(Gen_2)#Invalid_Stats_Workaround
|
||||
boot.initrd.availableKernelModules = [ "battery" ];
|
||||
|
||||
# New ThinkPads have a different TrackPoint manufacturer/name.
|
||||
# See also https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/
|
||||
hardware.trackpoint.device = "TPPS/2 Elan TrackPoint";
|
||||
|
||||
# Since the HDMI port is connected to the NVIDIA card.
|
||||
hardware.bumblebee.connectDisplay = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
bumblebee = super.bumblebee.override {
|
||||
extraNvidiaDeviceOptions = ''
|
||||
Option "AllowEmptyInitialConfiguration"
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
services.xserver = mkMerge [
|
||||
{
|
||||
# Set the right DPI. xdpyinfo says the screen is 508×285 mm but
|
||||
# it actually is 344×193 mm.
|
||||
monitorSection = ''
|
||||
DisplaySize 344 193
|
||||
'';
|
||||
}
|
||||
|
||||
# To support intel-virtual-output when using Bumblebee.
|
||||
(mkIf config.hardware.bumblebee.enable {
|
||||
deviceSection = ''Option "VirtualHeads" "1"'';
|
||||
videoDrivers = [ "intel" ];
|
||||
})
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -2,31 +2,19 @@
|
||||
# standing with kernel 4.6.11 is the following wiki page:
|
||||
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6). The
|
||||
# TrackPoint and TouchPad issues there seem to have been fixed already.
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
#
|
||||
# Enable the lower-power S3 suspend state by upgrading the BIOS to version >= 1.30,
|
||||
# then manually selecting Linux in the power management section.
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/pc/laptop/acpi_call.nix
|
||||
../../../../common/pc/laptop/cpu-throttling-bug.nix
|
||||
];
|
||||
|
||||
# See https://linrunner.de/en/tlp/docs/tlp-faq.html#battery
|
||||
services.tlp.extraConfig = ''
|
||||
START_CHARGE_THRESH_BAT0=75
|
||||
STOP_CHARGE_THRESH_BAT0=80
|
||||
CPU_SCALING_GOVERNOR_ON_BAT=powersave
|
||||
ENERGY_PERF_POLICY_ON_BAT=powersave
|
||||
'';
|
||||
# New ThinkPads have a different TrackPoint manufacturer/name.
|
||||
# See also https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/
|
||||
hardware.trackpoint.device = "TPPS/2 Elan TrackPoint";
|
||||
|
||||
# Enable S3 suspend state: you have to manually follow the
|
||||
# instructions shown here: https://delta-xi.net/#056 in order to
|
||||
# produce the ACPI patched table. Put the CPIO archive in /boot and
|
||||
# then enable the following lines
|
||||
# boot.kernelParams = [
|
||||
# "mem_sleep_default=deep"
|
||||
# ];
|
||||
# boot.initrd.prepend = [
|
||||
# "${/boot/acpi_override}"
|
||||
# ];
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
# This can be removed when the default kernel is at least version 5.6
|
||||
# https://github.com/NixOS/nixpkgs/pull/86168
|
||||
boot.kernelPackages = lib.mkIf
|
||||
(lib.versionOlder pkgs.linux.version "5.6")
|
||||
(lib.mkDefault pkgs.linuxPackages_latest);
|
||||
|
||||
# This can be removed when PulseAudio is at least version 14
|
||||
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Audio
|
||||
hardware.pulseaudio.extraConfig = ''
|
||||
load-module module-alsa-sink device=hw:0,0 channels=4
|
||||
load-module module-alsa-source device=hw:0,6 channels=4
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/pc/laptop/acpi_call.nix
|
||||
./audio.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ config, lib, ... }: {
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# automatic screen orientation
|
||||
hardware.sensor.iio.enable = true;
|
||||
|
||||
services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, lib, ... }: {
|
||||
# Reference to hardware: https://certification.ubuntu.com/hardware/202004-27844
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# Somehow psmouse does not load automatically on boot for me
|
||||
boot.kernelModules = [ "psmouse" ];
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop/hdd
|
||||
../tp-smapi.nix
|
||||
];
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/cpu/intel/sandy-bridge
|
||||
../../../common/pc/laptop/hdd # TODO: reverse compat
|
||||
../tp-smapi.nix
|
||||
];
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "tpm-rng" ];
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
imports = [ ../common.nix ];
|
||||
}
|
||||
@@ -1,6 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelModules = [
|
||||
"tpm-rng"
|
||||
];
|
||||
};
|
||||
|
||||
services.xserver.deviceSection = lib.mkDefault ''
|
||||
Option "TearFree" "true"
|
||||
'';
|
||||
}
|
||||
@@ -2,5 +2,6 @@
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
@@ -5,8 +5,13 @@
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
# 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.extraConfig = ''
|
||||
SATA_LINKPWR_ON_BAT=med_power_with_dipm
|
||||
'';
|
||||
services.tlp.settings = {
|
||||
SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
|
||||
};
|
||||
}
|
||||
@@ -3,4 +3,9 @@
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
# Disable "Panel Self Refresh". Fix random freezes.
|
||||
"i915.enable_psr=0"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/ssd/default.nix
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
# to use the type cover in the initrd
|
||||
boot.kernelModules = [ "hid-microsoft" ];
|
||||
|
||||
# TODO: reverse compat
|
||||
networking.wireless.enable = lib.mkDefault true;
|
||||
imports = [ ../../surface ];
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
# Derivatives for Microsoft Surface notebooks
|
||||
|
||||
These derivatives use the patches from the [linux-surface repo](https://github.com/linux-surface/linux-surface/tree/master/patches).
|
||||
|
||||
## Kernel
|
||||
|
||||
The kernel needs several patches to make it work correctly with some of the hardware on various
|
||||
Surface models, e.g. keyboard/trackpad, camera, wifi.
|
||||
|
||||
Not all hardware is fully supported, but the
|
||||
[linux-surface feature matrix](https://github.com/linux-surface/linux-surface/wiki/Supported-Devices-and-Features#feature-matrix)
|
||||
provides details on which devices are supported on which types of machine.
|
||||
|
||||
The kernel-specific derivations are under the `kernel/` sub-directory.
|
||||
In order to simplify maintenance of the Nix code, only the most-recent kernel patch-set is expected
|
||||
to be maintained in this repo.
|
||||
|
||||
_*NOTE:*_ Some built-in Kernel config items need to be set, that aren't set by default:
|
||||
- https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
|
||||
|
||||
## Firmware, Drivers and Support Tools
|
||||
|
||||
### WiFi
|
||||
|
||||
For the Surface Go, please see the "Issues" sections below.
|
||||
|
||||
### IPTS
|
||||
|
||||
IPTS is used on most of the Surface range, except for Surface Go and Surface Laptop 3 (AMD version).
|
||||
|
||||
Older kernels used specialised firmware which used a method that's no longer supported by the
|
||||
more-recent kernels.
|
||||
|
||||
Newer kernels use the kernel-space `intel-precise-touch` driver and user-space `ipstd` daemon.
|
||||
|
||||
The `iptsd` daemon works with the `intel-precise-touch` driver to convert raw touch data from the
|
||||
kernel-space driver into events for the HID / input sub-system.
|
||||
|
||||
- https://github.com/linux-surface/iptsd
|
||||
- https://github.com/linux-surface/intel-precise-touch
|
||||
- _*NOTE:*_ The patches from this repo are included in the above kernel patches, already.
|
||||
|
||||
### DTX, `surface-control`
|
||||
|
||||
#### surface-control
|
||||
|
||||
For controlling the performance modes and other aspects of the device, the [`surface-control`](https://github.com/linux-surface/surface-control) tool is included.
|
||||
|
||||
To be able to control the performance mode without using `sudo`, add your user to the `surface-control` group.
|
||||
|
||||
# ToDo's Not Done
|
||||
|
||||
See: [TODO.org](./TODO.org)
|
||||
|
||||
# Issues
|
||||
|
||||
## TLP daemon
|
||||
|
||||
TLP is known to cause problems on Surface unless correctly configured.
|
||||
See: https://github.com/linux-surface/linux-surface/blob/master/README.md
|
||||
|
||||
## Wifi Firmware for Surface Go
|
||||
|
||||
On the Surface Go, the standard firmware from the official Linux Firmware repo has issues with the
|
||||
`ath10k` QCA6174 Wifi device.
|
||||
You will see messages like "Can't ping firmware".
|
||||
|
||||
The most effective fix to-date is to remove the `board-2.bin` file or replace it with a copy of the
|
||||
`board.bin` file.
|
||||
|
||||
The derivative in `firmware/surface-go/ath10k/` can configure this, if you set the option
|
||||
`config.hardware.microsoft-surface.firmware.surface-go-ath10k.replace` to `true`.
|
||||
|
||||
_*NOTE:*_ This is destructive, as it deletes all the `board.bin` and `board-2.bin` files for the
|
||||
`ath10k` QCA6174 device, and replaces them with KillerNetworking's version.
|
||||
This is the only way (currently) to force the driver to use the new firmware.
|
||||
|
||||
For more details, see: https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wifi-firmware
|
||||
|
||||
_*NOTE:*_ There's some work to patch the kernel to make it easier to override which firmware file
|
||||
to use for QCA6174, which would obviate this more-destructuve approach:
|
||||
- https://github.com/linux-surface/kernel/commit/22ef83836c4aa89e9eb98de9b47ed24b6c2a1d45
|
||||
|
||||
_*NOTE:*_ There was an attempt to get this firmware incorporated into the aggregate `board-2.bin`,
|
||||
but (as of this writing) the request appears to have been ignored:
|
||||
- https://github.com/linux-surface/linux-surface/issues/41
|
||||
|
||||
References:
|
||||
- https://github.com/jakeday/linux-surface/issues/441
|
||||
- https://www.reddit.com/r/SurfaceLinux/comments/e8quqg/surface_go_official_wifi_fix/
|
||||
- https://hackmd.io/@dasgeek/ryA5i5Dor
|
||||
- https://github.com/thebitstick/surfacego-wifi
|
||||
- https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ath10k
|
||||
- https://wireless.wiki.kernel.org/en/users/drivers/ath10k/firmware
|
||||
@@ -0,0 +1,55 @@
|
||||
* Kernel Patching
|
||||
** DONE Create derivative to patch kernel 5.10.2
|
||||
- Latest from linux-surface
|
||||
- [X] Download github.com/linux-surface/linux-surface kernel patches
|
||||
- [X] Build kernel using downloaded patches
|
||||
** CANCELLED Create a function for selecting preferred kernel
|
||||
** DONE Fix how Keyboard & Trackpad are not being enabled on SL3
|
||||
- https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
|
||||
** DONE Update to kernel 5.10.19
|
||||
:LOGBOOK:
|
||||
- State "DONE" from "DOING" [2021-03-06 Sat 20:55]
|
||||
:END:
|
||||
* Firmware
|
||||
** DONE Remove old firmware binaries
|
||||
- Looks like the ath10k files aren't needed, any more
|
||||
** DONE Create derivative for `ipts` firmware
|
||||
- [X] Download github.com/linux-surface/surface-ipts-firmware firmware
|
||||
- [X] Install the binaries
|
||||
** DONE Remove `ipts` firmware derivative
|
||||
- This is only needed on the 4.19 kernel
|
||||
** DONE Investigate problem with ath10k wifi firmware on Surface Go
|
||||
:LOGBOOK:
|
||||
- State "DOING" from "TODO" [2021-02-09 Tue 17:19]
|
||||
- State "DONE" from "DOING" [2021-03-06 Sat 15:27]
|
||||
:END:
|
||||
*** DONE README entry explaining problem(s) with nonfree firmware on Surface Go
|
||||
:LOGBOOK:
|
||||
- State "DONE" from "TODO" [2021-02-09 Tue 17:17]
|
||||
:END:
|
||||
*** DONE Create derivative for `ath10k` firmware on Surface Go
|
||||
:LOGBOOK:
|
||||
- State "DOING" from "TODO" [2021-02-09 Tue 17:18]
|
||||
:END:
|
||||
- [X] Download github.com/kvalo/ath10k-firmware ?
|
||||
- [X] Download kernel.org linux-firmware?
|
||||
- [X] Download `board.bin` from Killer Networks?
|
||||
- [X] Install ath10k firmware fix for Surface Go
|
||||
- `board-2.bin` needs to be removed / replaced with `board.bin`
|
||||
- [X] Add a config option for enabling the Surface Go Firmware
|
||||
- [-] Replace the vendorised `board.bin` with a `fetchurl`
|
||||
- Getting HTTP 406 when using `fetchurl` or `nix-prefetch-url` that has to be diagnosed
|
||||
* Support Tools
|
||||
** TODO Incorporate @hpfr's function(s) from this commit:
|
||||
- https://github.com/hpfr/system/commit/03fa1b0a83f8a336e812910d0d50f5247a8a630c
|
||||
** TODO Create derivative for `iptsd` touch-screen daemon
|
||||
- [ ] Download
|
||||
- [ ] Install binary
|
||||
- [ ] Enable via systemd
|
||||
** TODO Create derivative to patch and rebuild libwacom
|
||||
- github.com/linux-surface/libwacom-surface
|
||||
- The plan is to do this in a separate PR against `nixpkgs` instead of `nixos-hardware`
|
||||
** TODO Create derivative to install `surface-control`
|
||||
- Download github.com/linux-surface/surface-control
|
||||
** TODO Create derivative to install `surface-dtx-daemon`
|
||||
- Download github.com/linux-surface/surface-dtx-daemon
|
||||
@@ -0,0 +1,8 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
imports =
|
||||
[ ./kernel ./hardware_configuration.nix ./firmware/surface-go/ath10k ];
|
||||
|
||||
environment.systemPackages = with pkgs; [ surface-control ];
|
||||
users.groups.surface-control = { };
|
||||
services.udev.packages = [ pkgs.surface-control ];
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{stdenv, lib, pkgs, firmwareLinuxNonfree, ...}:
|
||||
let
|
||||
repos = (pkgs.callPackage ../../../repos.nix {});
|
||||
# killernetworking_firmware = ./K1535_Debian;
|
||||
killernetworking_firmware = repos.ath10k-firmware + "/K1535_Debian";
|
||||
in
|
||||
firmwareLinuxNonfree.overrideAttrs (old: rec {
|
||||
pname = "microsoft-surface-go-firmware-linux-nonfree";
|
||||
srcs = [
|
||||
firmwareLinuxNonfree.src
|
||||
killernetworking_firmware
|
||||
];
|
||||
sourceRoot = firmwareLinuxNonfree.src;
|
||||
|
||||
dontMakeSourcesWritable = true;
|
||||
postInstall = ''
|
||||
# Delete the non-working firmware:
|
||||
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board.bin
|
||||
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board-2.bin
|
||||
|
||||
# Install the Surface Go Wifi firmware:
|
||||
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/
|
||||
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/
|
||||
'';
|
||||
|
||||
outputHash = "1nc56qii96dfvxnv3ad3lxz2rzyqcbldk0h9rbm3l2pgamkvj8dw";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware";
|
||||
platforms = platforms.linux;
|
||||
priority = 5;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,22 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
hardware.microsoft-surface.firmware.surface-go-ath10k = {
|
||||
replace = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.replace {
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.firmware = [
|
||||
(pkgs.callPackage ./ath10k-replace.nix {})
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = lib.mkDefault ''
|
||||
options ath10k_core skip_otp=Y
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
boot.extraModprobeConfig = lib.mkDefault ''
|
||||
options i915 enable_fbc=1 enable_rc6=1 modeset=1
|
||||
options snd_hda_intel power_save=1
|
||||
options snd_ac97_codec power_save=1
|
||||
options iwlwifi power_save=Y
|
||||
options iwldvm force_cam=N
|
||||
'';
|
||||
|
||||
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
||||
|
||||
# NOTE: Check the README before enabling TLP:
|
||||
services.tlp.enable = lib.mkDefault false;
|
||||
|
||||
hardware.sensor.iio.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.kernelPackages = pkgs.callPackage ./linux-5.10.19 {};
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
repos = (pkgs.callPackage ../../repos.nix {});
|
||||
patches = repos.linux-surface + "/patches";
|
||||
surface_kernelPatches = [
|
||||
{ name = "microsoft-surface-patches-linux-5.10.19";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
#
|
||||
# Surface Aggregator Module
|
||||
#
|
||||
SURFACE_AGGREGATOR m
|
||||
SURFACE_AGGREGATOR_ERROR_INJECTION n
|
||||
SURFACE_AGGREGATOR_BUS y
|
||||
SURFACE_AGGREGATOR_CDEV m
|
||||
SURFACE_AGGREGATOR_REGISTRY m
|
||||
|
||||
SURFACE_ACPI_NOTIFY m
|
||||
SURFACE_DTX m
|
||||
SURFACE_PERFMODE m
|
||||
|
||||
SURFACE_HID m
|
||||
SURFACE_KBD m
|
||||
|
||||
BATTERY_SURFACE m
|
||||
CHARGER_SURFACE m
|
||||
|
||||
#
|
||||
# These built-in modules are required for the Surface Aggregator Module
|
||||
# See: https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
|
||||
#
|
||||
SERIAL_DEV_BUS y
|
||||
SERIAL_DEV_CTRL_TTYPORT y
|
||||
|
||||
#
|
||||
# Surface Hotplug
|
||||
#
|
||||
SURFACE_HOTPLUG m
|
||||
|
||||
#
|
||||
# IPTS touchscreen
|
||||
#
|
||||
# This only enables the user interface for IPTS data.
|
||||
# For the touchscreen to work, you need to install iptsd.
|
||||
#
|
||||
MISC_IPTS m
|
||||
|
||||
#
|
||||
# Cameras: IPU3
|
||||
#
|
||||
## Not yet supported in the patches
|
||||
# VIDEO_IPU3_IMGU m
|
||||
VIDEO_IPU3_CIO2 m
|
||||
CIO2_BRIDGE y
|
||||
INTEL_SKL_INT3472 m
|
||||
|
||||
#
|
||||
# Cameras: Sensor drivers
|
||||
#
|
||||
VIDEO_OV5693 m
|
||||
## Not yet supported in the patches
|
||||
# VIDEO_OV8865 m
|
||||
|
||||
#
|
||||
# ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7
|
||||
#
|
||||
APDS9960 m
|
||||
|
||||
#
|
||||
# Other Drivers
|
||||
#
|
||||
INPUT_SOC_BUTTON_ARRAY m
|
||||
SURFACE_3_BUTTON m
|
||||
SURFACE_3_POWER_OPREGION m
|
||||
SURFACE_PRO3_BUTTON m
|
||||
SURFACE_GPE m
|
||||
SURFACE_BOOK1_DGPU_SWITCH m
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0001-surface3-oemb";
|
||||
patch = patches + "/5.10/0001-surface3-oemb.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0002-wifi";
|
||||
patch = patches + "/5.10/0002-wifi.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0003-ipts";
|
||||
patch = patches + "/5.10/0003-ipts.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0004-surface-gpe";
|
||||
patch = patches + "/5.10/0004-surface-gpe.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0005-surface-sam-over-hid";
|
||||
patch = patches + "/5.10/0005-surface-sam-over-hid.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0006-surface-sam";
|
||||
patch = patches + "/5.10/0006-surface-sam.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0007-surface-hotplug";
|
||||
patch = patches + "/5.10/0007-surface-hotplug.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0008-surface-typecover";
|
||||
patch = patches + "/5.10/0008-surface-typecover.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0009-surface-sensors";
|
||||
patch = patches + "/5.10/0009-surface-sensors.patch";
|
||||
}
|
||||
{
|
||||
name = "ms-surface/0010-cameras";
|
||||
patch = patches + "/5.10/0010-cameras.patch";
|
||||
}
|
||||
];
|
||||
in (with pkgs; recurseIntoAttrs (linuxPackagesFor (
|
||||
callPackage ./linux-5.10.19.nix {
|
||||
kernelPatches = surface_kernelPatches;
|
||||
}
|
||||
)))
|
||||
@@ -0,0 +1,18 @@
|
||||
{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
|
||||
|
||||
with lib;
|
||||
|
||||
buildLinux (args // rec {
|
||||
version = "5.10.19";
|
||||
|
||||
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
|
||||
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
|
||||
|
||||
# branchVersion needs to be x.y
|
||||
extraMeta.branch = versions.majorMinor version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "1mml5a30ky0khzj3r6ahybycbbszk86agq62qclwq2kzvsqbprr7";
|
||||
};
|
||||
} // (args.argsOverride or {}))
|
||||
Loaded 100 of 114 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user