mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-11-30 13:03:30 +01:00
Compare commits
52
Commits
rpi
...
add-xps-9570
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a326e16c0f | ||
|
|
adecd1113c | ||
|
|
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 |
No files matched your search
+1
-1
@@ -1,2 +1,2 @@
|
||||
language: nix
|
||||
script: nix-build --dry-run --show-trace
|
||||
script: nix-build release.nix --dry-run --show-trace
|
||||
@@ -1,5 +1,6 @@
|
||||
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
|
||||
|
||||
@@ -20,46 +20,63 @@ imports = [
|
||||
];
|
||||
```
|
||||
|
||||
## Profiles
|
||||
## Incomplete list of Profiles
|
||||
|
||||
| Model | Path |
|
||||
| --------------------------------- | -------------------------------------------- |
|
||||
| [Acer Aspire 4810T][] | `<nixos-hardware/acer/aspire/4810t>` |
|
||||
| Airis N990 | `<nixos-hardware/airis/n990>` |
|
||||
| Apple MacBook Air 4,X | `<nixos-hardware/apple/macbook-air/4>` |
|
||||
| Apple MacBook Air 6,X | `<nixos-hardware/apple/macbook-air/6>` |
|
||||
| [Apple MacBook Pro 10,1][] | `<nixos-hardware/apple/macbook-pro/10-1>` |
|
||||
| Apple MacBook Pro 12,1 | `<nixos-hardware/apple/macbook-pro/12-1>` |
|
||||
| BeagleBoard PocketBeagle | `<nixos-hardware/beagleboard/pocketbeagle>` |
|
||||
| [Dell XPS 13 9370][] | `<nixos-hardware/dell/xps/13-9370>` |
|
||||
| [Dell XPS 15 9550][] | `<nixos-hardware/dell/xps/15-9550>` |
|
||||
| [Inverse Path USB armory][] | `<nixos-hardware/inversepath/usbarmory>` |
|
||||
| Lenovo IdeaPad Z510 | `<nixos-hardware/lenovo/ideapad/z510>` |
|
||||
| Lenovo ThinkPad T410 | `<nixos-hardware/lenovo/thinkpad/t410>` |
|
||||
| Lenovo ThinkPad T430 | `<nixos-hardware/lenovo/thinkpad/t430>` |
|
||||
| Lenovo ThinkPad T440s | `<nixos-hardware/lenovo/thinkpad/t440s>` |
|
||||
| Lenovo ThinkPad T440p | `<nixos-hardware/lenovo/thinkpad/t440p>` |
|
||||
| Lenovo ThinkPad T450s | `<nixos-hardware/lenovo/thinkpad/t450s>` |
|
||||
| Lenovo ThinkPad T460s | `<nixos-hardware/lenovo/thinkpad/t460s>` |
|
||||
| Lenovo ThinkPad X140e | `<nixos-hardware/lenovo/thinkpad/x140e>` |
|
||||
| Lenovo ThinkPad X220 | `<nixos-hardware/lenovo/thinkpad/x220>` |
|
||||
| Lenovo ThinkPad X230 | `<nixos-hardware/lenovo/thinkpad/x230>` |
|
||||
| Lenovo ThinkPad X250 | `<nixos-hardware/lenovo/thinkpad/x250>` |
|
||||
| [Lenovo ThinkPad X260][] | `<nixos-hardware/lenovo/thinkpad/x260>` |
|
||||
| Lenovo ThinkPad X270 | `<nixos-hardware/lenovo/thinkpad/x270>` |
|
||||
| [Lenovo ThinkPad X1 (6th Gen)][] | `<nixos-hardware/lenovo/thinkpad/x1/6th-gen>`|
|
||||
| [Microsoft Surface Pro 3][] | `<nixos-hardware/microsoft/surface-pro/3>` |
|
||||
| PC Engines APU | `<nixos-hardware/pcengines/apu>` |
|
||||
| [Raspberry Pi 2][] | `<nixos-hardware/raspberry-pi/2>` |
|
||||
| [Samsung Series 9 NP900X3C][] | `<nixos-hardware/samsung/np900x3c>` |
|
||||
| [Purism Librem 13v3][] | `<nixos-hardware/purism/librem/13v3>` |
|
||||
| Supermicro A1SRi-2758F | `<nixos-hardware/supermicro/a1sri-2758f>` |
|
||||
| Supermicro X10SLL-F | `<nixos-hardware/supermicro/x10sll-f>` |
|
||||
| [Toshiba Chromebook 2 `swanky`][] | `<nixos-hardware/toshiba/swanky>` |
|
||||
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>` |
|
||||
| BeagleBoard PocketBeagle | `<nixos-hardware/beagleboard/pocketbeagle>` |
|
||||
| [Dell XPS E7240][] | `<nixos-hardware/dell/e7240>` |
|
||||
| [Dell XPS 13 7390][] | `<nixos-hardware/dell/xps/13-7390>` |
|
||||
| [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 9550][] | `<nixos-hardware/dell/xps/15-9550>` |
|
||||
| [Inverse Path USB armory][] | `<nixos-hardware/inversepath/usbarmory>` |
|
||||
| Lenovo IdeaPad Z510 | `<nixos-hardware/lenovo/ideapad/z510>` |
|
||||
| Lenovo ThinkPad P53 | `<nixos-hardware/lenovo/thinkpad/p53>` |
|
||||
| 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 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 X140e | `<nixos-hardware/lenovo/thinkpad/x140e>` |
|
||||
| Lenovo ThinkPad X220 | `<nixos-hardware/lenovo/thinkpad/x220>` |
|
||||
| Lenovo ThinkPad X230 | `<nixos-hardware/lenovo/thinkpad/x230>` |
|
||||
| Lenovo ThinkPad X250 | `<nixos-hardware/lenovo/thinkpad/x250>` |
|
||||
| [Lenovo ThinkPad X260][] | `<nixos-hardware/lenovo/thinkpad/x260>` |
|
||||
| Lenovo ThinkPad X270 | `<nixos-hardware/lenovo/thinkpad/x270>` |
|
||||
| [Lenovo ThinkPad X1 (6th Gen)][] | `<nixos-hardware/lenovo/thinkpad/x1/6th-gen>` |
|
||||
| Lenovo ThinkPad X1 Extreme Gen 2 | `<nixos-hardware/lenovo/thinkpad/x1-extreme/gen2>` |
|
||||
| [Microsoft Surface Pro 3][] | `<nixos-hardware/microsoft/surface-pro/3>` |
|
||||
| PC Engines APU | `<nixos-hardware/pcengines/apu>` |
|
||||
| [Raspberry Pi 2][] | `<nixos-hardware/raspberry-pi/2>` |
|
||||
| [Samsung Series 9 NP900X3C][] | `<nixos-hardware/samsung/np900x3c>` |
|
||||
| [Purism Librem 13v3][] | `<nixos-hardware/purism/librem/13v3>` |
|
||||
| Supermicro A1SRi-2758F | `<nixos-hardware/supermicro/a1sri-2758f>` |
|
||||
| Supermicro X10SLL-F | `<nixos-hardware/supermicro/x10sll-f>` |
|
||||
| [Toshiba Chromebook 2 `swanky`][] | `<nixos-hardware/toshiba/swanky>` |
|
||||
|
||||
[Acer Aspire 4810T]: acer/aspire/4810t
|
||||
[Apple MacBook Pro 10,1]: apple/macbook-pro/10-1
|
||||
[Dell XPS E7240]: dell/e7240
|
||||
[Dell XPS 13 7390]: dell/xps/13-7390
|
||||
[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 9550]: dell/xps/15-9550
|
||||
[Inverse Path USB armory]: inversepath/usbarmory
|
||||
[Lenovo ThinkPad X1 (6th Gen)]: lenovo/thinkpad/x1/6th-gen
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Temporary fix for cpu throttling issues visible in the kernel log
|
||||
# (journalctl -k) by setting the same temperature limits used by
|
||||
# Window$
|
||||
# See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues
|
||||
systemd.services.cpu-throttling = {
|
||||
enable = true;
|
||||
description = "Sets the offset to 3 °C, so the new trip point is 97 °C";
|
||||
documentation = [
|
||||
"https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues"
|
||||
];
|
||||
path = [ pkgs.msr-tools ];
|
||||
script = "wrmsr -a 0x1a2 0x3000000";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
wantedBy = [
|
||||
"timers.target"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.timers.cpu-throttling = {
|
||||
enable = true;
|
||||
description = "Set cpu heating limit to 97 °C";
|
||||
documentation = [
|
||||
"https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues"
|
||||
];
|
||||
timerConfig = {
|
||||
OnActiveSec = 60;
|
||||
OnUnitActiveSec = 60;
|
||||
Unit = "cpu-throttling.service";
|
||||
};
|
||||
wantedBy = [
|
||||
"timers.target"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -4,4 +4,6 @@
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = lib.mkDefault 1;
|
||||
};
|
||||
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
}
|
||||
+3
-52
@@ -1,52 +1,3 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
shim = {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
buildProfile = profile: (import <nixpkgs/nixos> {
|
||||
configuration.imports = [ profile shim ];
|
||||
}).system;
|
||||
in
|
||||
|
||||
{
|
||||
acer-aspire-4810t = buildProfile ./acer/aspire/4810t;
|
||||
|
||||
airis-n990 = buildProfile ./airis/n990;
|
||||
|
||||
apple-macbook-air-4 = buildProfile ./apple/macbook-air/4;
|
||||
apple-macbook-air-6 = buildProfile ./apple/macbook-air/6;
|
||||
apple-macbook-pro-10-1 = buildProfile ./apple/macbook-pro/10-1;
|
||||
apple-macbook-pro-11-5 = buildProfile ./apple/macbook-pro/11-5;
|
||||
apple-macbook-pro-12-1 = buildProfile ./apple/macbook-pro/12-1;
|
||||
|
||||
dell-xps-13-9370 = buildProfile ./dell/xps/13-9370;
|
||||
dell-xps-15-9550 = buildProfile ./dell/xps/15-9550;
|
||||
|
||||
lenovo-thinkpad-t410 = buildProfile ./lenovo/thinkpad/t410;
|
||||
lenovo-thinkpad-t440p = buildProfile ./lenovo/thinkpad/t440p;
|
||||
lenovo-thinkpad-t450s = buildProfile ./lenovo/thinkpad/t450s;
|
||||
lenovo-thinkpad-t460s = buildProfile ./lenovo/thinkpad/t460s;
|
||||
lenovo-thinkpad-x140e = buildProfile ./lenovo/thinkpad/x140e;
|
||||
lenovo-thinkpad-x220 = buildProfile ./lenovo/thinkpad/x220;
|
||||
lenovo-thinkpad-x230 = buildProfile ./lenovo/thinkpad/x230;
|
||||
lenovo-thinkpad-x250 = buildProfile ./lenovo/thinkpad/x250;
|
||||
lenovo-thinkpad-x260 = buildProfile ./lenovo/thinkpad/x260;
|
||||
|
||||
microsoft-surface-pro-3 = buildProfile ./microsoft/surface-pro/3;
|
||||
|
||||
pcengines-apu = buildProfile ./pcengines/apu;
|
||||
|
||||
toshiba-swanky = buildProfile ./toshiba/swanky;
|
||||
}
|
||||
# This file is necessary so nix-env -qa does not break,
|
||||
# when nixos-hardware is used as a channel
|
||||
{}
|
||||
@@ -0,0 +1,8 @@
|
||||
On some kernel versions user ashgillman has experiences suspend issues
|
||||
(see https://bugzilla.redhat.com/show_bug.cgi?id=1597481).
|
||||
|
||||
Try:
|
||||
|
||||
```nix
|
||||
boot.kernelPackages = pkgs.linuxPackages_4_14;
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../common/cpu/intel
|
||||
../../common/pc/laptop
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
= Dell XPS 13 7390 =
|
||||
|
||||
== 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,11 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
systemd-boot.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
|
||||
hardware.firmware = lib.mkBefore [ pkgs.qca6174-firmware ];
|
||||
|
||||
# TODO: move to general HiDPI profile
|
||||
@@ -23,4 +23,7 @@
|
||||
nixpkgs.overlays = [(final: previous: {
|
||||
qca6174-firmware = final.callPackage ./qca6174-firmware.nix {};
|
||||
})];
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
../../../common/cpu/intel/kaby-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/cpu-throttling-bug.nix
|
||||
];
|
||||
|
||||
# Force S3 sleep mode. See README.wiki for details.
|
||||
@@ -13,4 +12,9 @@
|
||||
|
||||
# touchpad goes over i2c
|
||||
boot.blacklistedKernelModules = [ "psmouse" ];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
= Dell XPS 13 9380 =
|
||||
|
||||
== Firmware upgrades ==
|
||||
|
||||
Note that this device is supported by [https://fwupd.org/ fwupd].
|
||||
To perform firmware upgrades just activate the service
|
||||
|
||||
<code>
|
||||
services.fwupd.enable = true;
|
||||
</code>
|
||||
|
||||
Then use <code>fwupdmgr</code> to perform updates.
|
||||
|
||||
== Battery drain when sleeping ==
|
||||
|
||||
The laptop uses the S2 sleep mode by default instead of S3, which leads to
|
||||
draining a lot of battery during sleep.
|
||||
|
||||
See https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)#Power_Management
|
||||
and https://bugzilla.kernel.org/show_bug.cgi?id=199689#c3 for reference
|
||||
@@ -0,0 +1,18 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
# Force S3 sleep mode. See README.wiki for details.
|
||||
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
||||
|
||||
# touchpad goes over i2c
|
||||
boot.blacklistedKernelModules = [ "psmouse" ];
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
}
|
||||
@@ -10,6 +10,9 @@
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
|
||||
# This will save you money and possibly your life!
|
||||
services.thermald.enable = true;
|
||||
|
||||
# To just use Intel integrated graphics with Intel's open source driver
|
||||
# hardware.nvidiaOptimus.disable = true;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
= Dell XPS 15 9570 =
|
||||
|
||||
== Tested Hardware ==
|
||||
|
||||
* CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
|
||||
* RAM: 32 GB
|
||||
* HDD: 256 GiB SSD
|
||||
* Screen: 15" 4k (3840✕2160)
|
||||
* Graphics: NVIDIA Corporation GP107M, with Intel Graphics too.
|
||||
* 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.)
|
||||
|
||||
|
||||
=== 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.
|
||||
|
||||
* ''Update Intel's Thunderbolt firmware.'' Without this, the Thunderbolt port will only work as power source, and not transfer data.
|
||||
|
||||
=== Troubleshooting ===
|
||||
@@ -0,0 +1,38 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
];
|
||||
|
||||
# TODO: boot loader
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
|
||||
nix.buildCores = lib.mkDefault 12;
|
||||
|
||||
# Recommended in Arch wiki, avoids shutdowns
|
||||
boot.kernelParams = [
|
||||
"mem_sleep_default=deep"
|
||||
"nouveau.blacklist=0"
|
||||
"acpi_osi=!"
|
||||
"acpi_osi=\"Windows 2015\""
|
||||
"acpi_backlight=vendor"
|
||||
];
|
||||
|
||||
# To just use Intel integrated graphics with Intel's open source driver
|
||||
# hardware.nvidiaOptimus.disable = true;
|
||||
|
||||
# To setup proprietary NVIDIA Optimus properly.
|
||||
# boot.blacklistedKernelModules = [ "nouveau" "nv" "rivafb" "nvidiafb" "rivatv" ];
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
# hardware.nvidia.optimus_prime.enable = true;
|
||||
# hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
# This should be the same for all XPS 9570 models with NVIDIA
|
||||
hardware.nvidia.optimus_prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
}
|
||||
@@ -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,10 @@
|
||||
{ nixos, pkgs, lib, config, stdenv, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
}
|
||||
@@ -4,7 +4,8 @@
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/cpu-throttling-bug.nix
|
||||
../.
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ nixos, lib, pkgs, config, stdenv, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../.
|
||||
];
|
||||
|
||||
services = {
|
||||
# This fixes the pulseaudio profiles of the Thinkpad T490.
|
||||
# The laptop contains a single audio card with 5 sub-devices. Default pulseaudio only offers a single sink
|
||||
# which can only be switched between speaker/HDMI via a manual profile change.
|
||||
# This configures a profile set for pulseaudio which offers multiple sinks corresponding to the
|
||||
# speaker + 4 HDMI ports. This allows the user to play audio streams on the speaker and any of the 4 HDMI/USB-C
|
||||
# ports at the same time.
|
||||
udev.extraRules = let
|
||||
t490ProfileSet = ./t490-profile-set.conf;
|
||||
in ''
|
||||
SUBSYSTEM!="sound", GOTO="pulseaudio_end"
|
||||
ACTION!="change", GOTO="pulseaudio_end"
|
||||
KERNEL!="card*", GOTO="pulseaudio_end"
|
||||
|
||||
# Lenovo T490
|
||||
ATTRS{vendor}=="0x8086" ATTRS{device}=="0x9dc8" ATTRS{subsystem_vendor}=="0x17aa", ATTRS{subsystem_device}=="0x2279", ENV{PULSE_PROFILE_SET}="${t490ProfileSet}"
|
||||
|
||||
LABEL="pulseaudio_end"
|
||||
'';
|
||||
|
||||
throttled.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
[Profile speaker+hdmi-stereo]
|
||||
description = Speaker + HDMI Stereo
|
||||
output-mappings = analog-stereo hdmi-stereo hdmi-stereo-extra1 hdmi-stereo-extra2
|
||||
input-mappings = analog-stereo
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f
|
||||
channel-map = left,right
|
||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
|
||||
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
|
||||
priority = 15
|
||||
|
||||
[Mapping hdmi-stereo]
|
||||
description = Stereo (HDMI)
|
||||
device-strings = hdmi:%f
|
||||
paths-output = hdmi-output-0
|
||||
channel-map = left,right
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-stereo-extra1]
|
||||
description = Stereo (HDMI 2)
|
||||
device-strings = hdmi:%f,1
|
||||
paths-output = hdmi-output-1
|
||||
channel-map = left,right
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-stereo-extra2]
|
||||
description = Stereo (HDMI 3)
|
||||
device-strings = hdmi:%f,2
|
||||
paths-output = hdmi-output-2
|
||||
channel-map = left,right
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Profile speaker+hdmi-surround]
|
||||
description = Speaker + HDMI 5.1
|
||||
output-mappings = analog-stereo hdmi-surround hdmi-surround-extra1 hdmi-surround-extra2
|
||||
input-mappings = analog-stereo
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f
|
||||
channel-map = left,right
|
||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
|
||||
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
|
||||
priority = 15
|
||||
|
||||
[Mapping hdmi-surround]
|
||||
description = Digital Surround 5.1 (HDMI)
|
||||
device-strings = hdmi:%f
|
||||
paths-output = hdmi-output-0
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround-extra1]
|
||||
description = Digital Surround 5.1 (HDMI 2)
|
||||
device-strings = hdmi:%f,1
|
||||
paths-output = hdmi-output-1
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround-extra2]
|
||||
description = Digital Surround 5.1 (HDMI 3)
|
||||
device-strings = hdmi:%f,2
|
||||
paths-output = hdmi-output-2
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Profile speaker+hdmi-surround71]
|
||||
description = Speaker + HDMI 7.1
|
||||
output-mappings = analog-stereo hdmi-surround71 hdmi-surround71-extra1 hdmi-surround71-extra2
|
||||
input-mappings = analog-stereo
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f
|
||||
channel-map = left,right
|
||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
|
||||
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
|
||||
priority = 15
|
||||
|
||||
[Mapping hdmi-surround71]
|
||||
description = Digital Surround 7.1 (HDMI)
|
||||
device-strings = hdmi:%f
|
||||
paths-output = hdmi-output-0
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
priority = 6
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround71-extra1]
|
||||
description = Digital Surround 7.1 (HDMI 2)
|
||||
device-strings = hdmi:%f,1
|
||||
paths-output = hdmi-output-1
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping hdmi-surround71-extra2]
|
||||
description = Digital Surround 7.1 (HDMI 3)
|
||||
device-strings = hdmi:%f,2
|
||||
paths-output = hdmi-output-2
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
priority = 6
|
||||
direction = output
|
||||
@@ -0,0 +1,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;
|
||||
}
|
||||
@@ -5,19 +5,16 @@
|
||||
#
|
||||
# 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, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/pc/laptop/acpi_call.nix
|
||||
../../../../common/pc/laptop/cpu-throttling-bug.nix
|
||||
];
|
||||
|
||||
# See https://linrunner.de/en/tlp/docs/tlp-faq.html#battery
|
||||
services.tlp.extraConfig = ''
|
||||
START_CHARGE_THRESH_BAT0=75
|
||||
STOP_CHARGE_THRESH_BAT0=80
|
||||
CPU_SCALING_GOVERNOR_ON_BAT=powersave
|
||||
ENERGY_PERF_POLICY_ON_BAT=powersave
|
||||
'';
|
||||
# New ThinkPads have a different TrackPoint manufacturer/name.
|
||||
# See also https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/
|
||||
hardware.trackpoint.device = "TPPS/2 Elan TrackPoint";
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -2,5 +2,6 @@
|
||||
imports = [
|
||||
../.
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
];
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
{
|
||||
boot.kernelParams = [ "console=ttyS0,115200n8" ];
|
||||
boot.loader.grub.extraConfig = "
|
||||
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
|
||||
terminal_input serial
|
||||
terminal_output serial
|
||||
";
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
shim = {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
buildProfile = profile: (import <nixpkgs/nixos> {
|
||||
configuration.imports = [ profile shim ];
|
||||
}).system;
|
||||
in
|
||||
|
||||
{
|
||||
acer-aspire-4810t = buildProfile ./acer/aspire/4810t;
|
||||
|
||||
airis-n990 = buildProfile ./airis/n990;
|
||||
|
||||
apple-macbook-air-4 = buildProfile ./apple/macbook-air/4;
|
||||
apple-macbook-air-6 = buildProfile ./apple/macbook-air/6;
|
||||
apple-macbook-pro-10-1 = buildProfile ./apple/macbook-pro/10-1;
|
||||
apple-macbook-pro-11-5 = buildProfile ./apple/macbook-pro/11-5;
|
||||
apple-macbook-pro-12-1 = buildProfile ./apple/macbook-pro/12-1;
|
||||
|
||||
dell-e7240 = buildProfile ./dell/e7240;
|
||||
dell-xps-13-9380 = buildProfile ./dell/xps/13-9380;
|
||||
dell-xps-13-9370 = buildProfile ./dell/xps/13-9370;
|
||||
dell-xps-15-9550 = buildProfile ./dell/xps/15-9550;
|
||||
|
||||
lenovo-thinkpad-t410 = buildProfile ./lenovo/thinkpad/t410;
|
||||
lenovo-thinkpad-t440p = buildProfile ./lenovo/thinkpad/t440p;
|
||||
lenovo-thinkpad-t450s = buildProfile ./lenovo/thinkpad/t450s;
|
||||
lenovo-thinkpad-t460s = buildProfile ./lenovo/thinkpad/t460s;
|
||||
lenovo-thinkpad-x140e = buildProfile ./lenovo/thinkpad/x140e;
|
||||
lenovo-thinkpad-x220 = buildProfile ./lenovo/thinkpad/x220;
|
||||
lenovo-thinkpad-x230 = buildProfile ./lenovo/thinkpad/x230;
|
||||
lenovo-thinkpad-x250 = buildProfile ./lenovo/thinkpad/x250;
|
||||
lenovo-thinkpad-x260 = buildProfile ./lenovo/thinkpad/x260;
|
||||
|
||||
microsoft-surface-pro-3 = buildProfile ./microsoft/surface-pro/3;
|
||||
|
||||
pcengines-apu = buildProfile ./pcengines/apu;
|
||||
|
||||
toshiba-swanky = buildProfile ./toshiba/swanky;
|
||||
}
|
||||
@@ -13,9 +13,6 @@ in
|
||||
../../common/pc/laptop
|
||||
];
|
||||
|
||||
# Sound only properly works out of the box on 4.18+ kernels.
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
|
||||
# Required for screen brightness control:
|
||||
boot.kernelParams = [ "acpi_backlight=vendor" ];
|
||||
|
||||
|
||||
Reference in new issue
Block a user