mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-11-30 21:13:30 +01:00
Compare commits
388
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 | ||
|
|
5c8cab8493 | ||
|
|
941fbef86f | ||
|
|
d4a430fef2 | ||
|
|
86cbb3256b | ||
|
|
18a2d7a5e3 | ||
|
|
78ea74365a | ||
|
|
78a1e6168f | ||
|
|
f78fd94f63 | ||
|
|
b7185cd232 | ||
|
|
142530bb88 | ||
|
|
d5b0b9349f | ||
|
|
7fbb7d50a6 | ||
|
|
6ed4feade2 | ||
|
|
f37c5dfb9a | ||
|
|
0400c7e1dd | ||
|
|
bdd79454ee | ||
|
|
6c55033883 | ||
|
|
55e7faf0cd | ||
|
|
415f4f4747 | ||
|
|
b9bdfee8c3 | ||
|
|
e785e2a3cb | ||
|
|
19553733f0 | ||
|
|
9939e5b3a4 | ||
|
|
7f17d649cc | ||
|
|
8fa41aff5b | ||
|
|
e9d8b30995 | ||
|
|
cfc72f6c9b | ||
|
|
2526dcbe61 | ||
|
|
b10d7a40b8 | ||
|
|
2ca9f58d7e | ||
|
|
23e4b913d3 | ||
|
|
111d7e8138 | ||
|
|
231323f697 | ||
|
|
e1804a0fdc | ||
|
|
631e81ce5e | ||
|
|
80ad9d8b66 | ||
|
|
218ef7df3c | ||
|
|
7b8ca6d868 | ||
|
|
2ec8af3817 | ||
|
|
4470239d63 | ||
|
|
a633fa6f68 | ||
|
|
d534770be7 | ||
|
|
9af7afffeb | ||
|
|
a9f65b8896 | ||
|
|
694fd85397 | ||
|
|
e31b175128 | ||
|
|
ec4c3da289 | ||
|
|
93d292b830 | ||
|
|
56b7d7254f | ||
|
|
b4303dc68b | ||
|
|
4428c70b17 | ||
|
|
b84f46f208 | ||
|
|
a3210f1d6b | ||
|
|
7a640afbb2 | ||
|
|
5561e7ab0b | ||
|
|
043605cfec | ||
|
|
4b5093a316 | ||
|
|
8b463a3ca2 | ||
|
|
212a5a7d7c | ||
|
|
585a13d8b9 | ||
|
|
e30cdb1109 | ||
|
|
5a545d7145 | ||
|
|
4d548d09cc | ||
|
|
c354d591a7 | ||
|
|
cbdcc55f37 | ||
|
|
32a7893b8c | ||
|
|
b132065a43 | ||
|
|
b42212f6f0 | ||
|
|
179bcde845 | ||
|
|
654262071f | ||
|
|
5dd535392d | ||
|
|
e0a8e01073 | ||
|
|
d0a8097eec | ||
|
|
cfee9e13a5 | ||
|
|
dd576672e7 | ||
|
|
6ba1e22e3f | ||
|
|
fbf167ed1e | ||
|
|
0794564c45 | ||
|
|
b586e1051b | ||
|
|
b47ca3e377 |
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: tests/eval.sh
|
||||
@@ -1,2 +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
|
||||
@@ -0,0 +1,31 @@
|
||||
# Writing profiles
|
||||
|
||||
When setting an option, use `lib.mkDefault` unless:
|
||||
- The option *must* be set and the user should get an error if they try to override it.
|
||||
- The setting should merge with the user's settings (typical for list or set options).
|
||||
|
||||
For example:
|
||||
|
||||
```nix
|
||||
{ lib }: {
|
||||
# Using mkDefault, because the user might want to disable tlp
|
||||
services.tlp.enable = lib.mkDefault true;
|
||||
# No need to use mkDefault, because the setting will merge with the user's setting
|
||||
boot.kernelModules = [ "tmp_smapi" ];
|
||||
}
|
||||
```
|
||||
|
||||
Try to avoid "opinionated" settings relating to optional features like sound, bluetooth, choice of bootloader etc.
|
||||
|
||||
Where possible, use module imports to share code between similar hardware variants.
|
||||
|
||||
# Performance
|
||||
|
||||
Profiles should favor usability and stability, so performance improvements should either be conservative or
|
||||
be guarded behind additional NixOS module options.
|
||||
|
||||
If it makes sense to have a performance-focussed config, it can be declared in a separate profile.
|
||||
|
||||
# Testing
|
||||
|
||||
Because profiles can only be tested with the appropriate hardware, quality assurance is up to *you*.
|
||||
@@ -1,6 +0,0 @@
|
||||
Profiles should favor usability and stability, so performance hacks should be
|
||||
activated by an additional NixOS option or conservative and performance configs
|
||||
can be declared in separate profiles.
|
||||
|
||||
Because profiles can only be tested with the appropriate hardware, quality
|
||||
assurance is up to *you*.
|
||||
File renamed without changes.
@@ -0,0 +1,189 @@
|
||||
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
|
||||
```
|
||||
|
||||
Then import an appropriate profile path from the table below. For example, to
|
||||
enable ThinkPad X220 profile, your `imports` in `/etc/nixos/configuration.nix`
|
||||
should look like:
|
||||
|
||||
```
|
||||
imports = [
|
||||
<nixos-hardware/lenovo/thinkpad/x220>
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
```
|
||||
|
||||
New updates to the expressions here will be fetched when you update the channel.
|
||||
|
||||
## 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
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
NixOS profiles covering hardware quirks.
|
||||
|
||||
** Setup
|
||||
|
||||
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
|
||||
|
||||
Then import an appropriate profile path from the table below. For example, to
|
||||
enable ThinkPad X220 profile, your ~imports~ in ~/etc/nixos/configuration.nix~
|
||||
should look like:
|
||||
|
||||
: imports = [ <nixos-hardware/lenovo/thinkpad/x220> ./hardware-configuration.nix ];
|
||||
|
||||
Starting with nix 2.0 it is also possible to use `builtins.fetchGit` to fetch this repository:
|
||||
|
||||
: imports = [
|
||||
: (builtins.fetchGit {
|
||||
: url = "https://github.com/NixOS/nixos-hardware";
|
||||
: # revision here is optional, if not given, nix will fetch updates automatically
|
||||
: rev = "a5fa2cc1ae6a1002962cf71fc23fbd533db412be";
|
||||
: } + "/lenovo/thinkpad/x250")
|
||||
: ./hardware-configuration.nix
|
||||
: ];
|
||||
|
||||
** Profiles
|
||||
|
||||
|---------------------------+--------------------------------------------|
|
||||
| Model | Path |
|
||||
|---------------------------+--------------------------------------------|
|
||||
| [[file:acer/aspire/4810t][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>~ |
|
||||
| [[file:apple/macbook-pro/10-1][Apple MacBook Pro 10,1]] | ~<nixos-hardware/apple/macbook-pro/10-1>~ |
|
||||
| Apple MacBook Pro 12,1 | ~<nixos-hardware/apple/macbook-pro/12-1>~ |
|
||||
| [[file:dell/xps/15-9550][Dell XPS 15 9550]] | ~<nixos-hardware/dell/xps/15-9550>~ |
|
||||
| [[file:inversepath/usbarmory][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 T440p | ~<nixos-hardware/lenovo/thinkpad/t440p>~ |
|
||||
| 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>~ |
|
||||
| [[file:microsoft/surface-pro/3][Microsoft Surface Pro 3]] | ~<nixos-hardware/microsoft/surface-pro/3>~ |
|
||||
| [[file:raspberry-pi/2][Raspberry Pi 2]] | ~<nixos-hardware/raspberry-pi/2>~ |
|
||||
| [[file:samsung/np900x3c][Samsung Series 9 NP900X3C]] | ~<nixos-hardware/samsung/np900x3c>~ |
|
||||
| Supermicro A1SRi-2758F | ~<nixos-hardware/supermicro/a1sri-2758f>~ |
|
||||
| Supermicro X10SLL-F | ~<nixos-hardware/supermicro/x10sll-f>~ |
|
||||
|---------------------------+--------------------------------------------|
|
||||
@@ -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,32 @@
|
||||
# Apple MacBook Pro 11,5
|
||||
|
||||
This configuration will **not** work with MacBook Pro 11,2 or 11,3 models.
|
||||
|
||||
## Notable features
|
||||
|
||||
* Prevent intermittent USB 3.0 controller wakeup signal when the lid is closed. Without this fix your laptop may get very hot and drain the battery after waking up in your laptop bag.
|
||||
|
||||
You can see for yourself which devices are allowed to wake up your laptop using the command:
|
||||
|
||||
```shell
|
||||
cat /proc/acpi/wakeup
|
||||
```
|
||||
|
||||
This fix works for Linux kernel 3.13 and above.
|
||||
|
||||
Sources:
|
||||
|
||||
* [Fix unwanted laptop resume after lid is closed](https://medium.com/@laurynas.karvelis_95228/install-arch-linux-on-macbook-pro-11-2-retina-install-guide-for-year-2017-2034ceed4cb2#66ba)
|
||||
* [Arch wiki: MacBookPro11,x Suspend](https://wiki.archlinux.org/index.php/MacBookPro11,x#Suspend)
|
||||
* [simonvandel/dotfiles (nix config)](https://github.com/simonvandel/dotfiles/blob/f254a4a607257faee295ce798ed215273c342850/nixos/vandel-macair/configuration.nix#L45)
|
||||
|
||||
## Graphics
|
||||
|
||||
The [MacBookPro11,4 and MacBookPro11,5](https://support.apple.com/kb/SP719) models ship with a discrete ATI graphics card (whereas MacBookPro11,2 and MacBookPro11,3 ship with NVidia cards). This is alongside the usual integrated Intel GPU.
|
||||
|
||||
You may wish to look into dynamic switching between integrated and discrete graphics, but this config doesn't attempt it.
|
||||
|
||||
## Additional resources
|
||||
|
||||
* Arch linux wiki: [MacBookPro11,x](https://wiki.archlinux.org/index.php/MacBookPro11,x)
|
||||
* Kernel patches: [MacBookPro11,x](https://bugzilla.kernel.org/buglist.cgi?quicksearch=macbookpro11)
|
||||
@@ -0,0 +1,27 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
kernelPackages = config.boot.kernelPackages;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop/ssd
|
||||
<nixpkgs/nixos/modules/hardware/network/broadcom-43xx.nix>
|
||||
];
|
||||
|
||||
# Apparently this is currently only supported by ati_unfree drivers, not ati
|
||||
hardware.opengl.driSupport32Bit = false;
|
||||
|
||||
services.xserver.videoDrivers = [ "ati" ];
|
||||
|
||||
services.udev.extraRules =
|
||||
# Disable XHC1 wakeup signal to avoid resume getting triggered some time
|
||||
# after suspend. Reboot required for this to take effect.
|
||||
lib.optionalString
|
||||
(lib.versionAtLeast kernelPackages.kernel.version "3.13")
|
||||
''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"'';
|
||||
}
|
||||
@@ -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" ];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
boot.kernelParams = [ "console=ttyO0,115200n8" ];
|
||||
|
||||
boot.loader = {
|
||||
generic-extlinux-compatible.enable = lib.mkDefault true;
|
||||
grub.enable = lib.mkDefault false;
|
||||
};
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||
services.xserver.videoDrivers = [ "intel" ];
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
|
||||
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,8 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
boot.kernelParams = [
|
||||
"i915.enable_fbc=1"
|
||||
"i915.enable_psr=2"
|
||||
];
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# acpi_call makes tlp work for newer thinkpads
|
||||
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
kernelModules = [ "acpi_call" ];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
||||
};
|
||||
}
|
||||
@@ -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
-1
@@ -1 +1,3 @@
|
||||
{ ... }: {}
|
||||
# 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;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
];
|
||||
|
||||
boot.blacklistedKernelModules = [ "psmouse" ]; # touchpad goes over i2c
|
||||
|
||||
# TODO: decide on boot loader policy
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
systemd-boot.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
= Dell XPS 13 9370 =
|
||||
|
||||
== 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.
|
||||
|
||||
Though this is intentional by the manufacturer and might cause lockups when
|
||||
forced I - @moredread - never had any issues with it.
|
||||
|
||||
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
|
||||
|
||||
== Additional resources ==
|
||||
|
||||
* Arch linux wiki: [https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370) Dell XPS 13 9370]
|
||||
@@ -0,0 +1,20 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../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" ];
|
||||
|
||||
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 ==
|
||||
|
||||
@@ -36,3 +43,17 @@ These settings are needed both for booting the final install, and installer itse
|
||||
* ''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:
|
||||
|
||||
```
|
||||
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
|
||||
@@ -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
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelParams = [
|
||||
# fixes brightness keys, see https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T430s
|
||||
"acpi_osi\='!Windows 2012'"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -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
|
||||
../.
|
||||
];
|
||||
}
|
||||
@@ -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
|
||||
../.
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.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;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# X1 6th generation with a QHD (2560x1440px) display
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
];
|
||||
|
||||
# Fix font sizes in X
|
||||
services.xserver.dpi = 210;
|
||||
fonts.fontconfig.dpi = 210;
|
||||
|
||||
# Fix sizes of GTK/GNOME ui elements
|
||||
environment.variables = {
|
||||
GDK_SCALE = lib.mkDefault "2";
|
||||
GDK_DPI_SCALE= lib.mkDefault "0.5";
|
||||
};
|
||||
# Enable readable font on console. The example configuration that
|
||||
# follows is taliored towards western languages. To see how to
|
||||
# configure the font download the source tarball from
|
||||
# http://terminus-font.sourceforge.net/ and read the README file on
|
||||
# the root dir
|
||||
|
||||
# i18n = {
|
||||
# # this means ISO8859-1 or ISO8859-15 or Windows-1252 codepages
|
||||
# # (ter-1), 16x32 px (32), normal font weight (n)
|
||||
# consoleFont = "ter-132n";
|
||||
# consoleKeyMap = "us";
|
||||
# defaultLocale = "en_US.UTF-8";
|
||||
# consolePackages = [ pkgs.terminus_font ];
|
||||
# };
|
||||
|
||||
# Early configure the console to make the font readable from the
|
||||
# start
|
||||
# boot.earlyVconsoleSetup = true;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# A good source of information about how to fix the issues still
|
||||
# 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.
|
||||
#
|
||||
# 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
|
||||
];
|
||||
|
||||
# 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";
|
||||
|
||||
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,6 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
];
|
||||
}
|
||||
@@ -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
|
||||
];
|
||||
|
||||
@@ -4,14 +4,11 @@
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
acpi_call
|
||||
];
|
||||
kernelModules = [
|
||||
"acpi_call"
|
||||
"tpm-rng"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../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.settings = {
|
||||
SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../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 ];
|
||||
}
|
||||
Loaded 100 of 127 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user