Compare commits

...
Author SHA1 Message Date
Domen Kožar 936e464909 Merge pull request #261 from samueldr/feature/rpi-4-overlays
raspberry-pi/4: Add modesetting option
2021-05-13 10:04:36 +02:00
Samuel Dionne-Riel 38af9c5048 raspberry-pi/4: Add modesetting option 2021-05-12 21:00:19 -04:00
Domen Kožar 9e58ee154c Merge pull request #256 from domenkozar/rpi4
Add Raspberry Pi 4
2021-05-12 21:52:24 +02:00
Domen KožarandJörg Thalheim bd06334074 rpi4: don't override sane default for nix.buildCores
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2021-05-12 21:42:30 +02:00
Domen Kožar 2b4ed534a8 rpi4: remove loader.raspberryPi as it's legacy 2021-05-12 14:37:30 +02:00
Domen Kožar cdaf66c0a0 rpi4: remove cma 2021-05-12 14:19:27 +02:00
Domen Kožar b72c683304 Add Rpi4 2021-05-11 15:53:04 +02:00
Domen Kožar 02f067b234 Merge pull request #257 from kfiz/macbook-pro-12-1-path-fix
apple/macbook-pro/12-1/default.nix: Fixed impure <nixpkgs> import.
2021-05-11 15:51:51 +02:00
Doro Rose 52060c81af apple/macbook-pro/12-1/default.nix: Fixed impure <nixpkgs> import. 2021-05-11 10:31:41 +02:00
Domen Kožar 68babad7f9 Merge pull request #253 from NixOS/thinkpad-x13
add lenovo-thinkpad-x13
2021-05-10 15:28:16 +02:00
Jörg Thalheim da67c36853 add lenovo-thinkpad-x13 2021-05-01 08:29:22 +02:00
Jörg Thalheim f7540d6c27 Merge pull request #251 from NixOS/dell
dell-xps-15-7590: remove 20.03 compat
2021-04-25 08:48:49 +01:00
Jörg Thalheim 09febc71c1 dell-xps-15-7590: remove 20.03 compat 2021-04-25 07:03:51 +02:00
Jörg Thalheim 241d8300b2 Merge pull request #250 from earldouglas/thinkpad/x200s
Add a profile for the Thinkpad X200s
2021-04-21 04:33:29 +01:00
James Earl Douglas 00b40b766f Add a profile for the Thinkpad X200s 2021-04-20 19:50:55 -07:00
Jörg Thalheim 590bdcacd5 Merge pull request #249 from earldouglas/t460
Add a profile for the Thinkpad T460
2021-04-20 19:56:13 +01:00
James Earl Douglas dbbd0d4093 Add a profile for the Thinkpad T460 2021-04-20 05:27:36 -07:00
Jörg Thalheim 267d8b2d7f Merge pull request #241 from j0hax/amd-gpus
Add profiles for AMD GPUs
2021-04-14 15:26:21 +01:00
Johannes Arnold 40ddf363c2 Document driver choice 2021-04-14 16:18:05 +02:00
Jörg Thalheim 7c00c8b5ca Merge pull request #242 from diogox/patch-1
Add Lenovo X1 Extreme Gen2 Module
2021-04-06 07:34:55 +01:00
Jörg Thalheim 3ef0c9521c Merge pull request #245 from NomisIV/patch-1
Add default lenovo-thinkpad-x1 config to flake.nix
2021-04-06 07:34:30 +01:00
Jörg Thalheim eb9d3e7df1 Merge pull request #244 from NixOS/SuperSandro2000-patch-1
Remove usage of stdenv.lib
2021-04-06 07:32:55 +01:00
Jörg Thalheim 085790185c Merge pull request #246 from NixOS/dependabot/github_actions/cachix/install-nix-action-v13
build(deps): bump cachix/install-nix-action from v12 to v13
2021-04-05 08:39:49 +01:00
dependabot[bot] 5bf5dee4f5 build(deps): bump cachix/install-nix-action from v12 to v13
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from v12 to v13.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v12...8d6d5e949675fbadb765c6b1a975047fa5f09b27)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 06:22:25 +00:00
NomisIV 3714e747c1 Add default lenovo-thinkpad-x1 config to flake.nix 2021-04-04 23:30:24 +02:00
Sandro bbb03cc6fe Remove usage of stdenv.lib 2021-04-01 21:24:49 +02:00
diogox c52f18ba51 Add Lenovo X1 Extreme Gen2 Module 2021-03-26 10:42:26 +00:00
Johannes Arnold f2b2ae018d AMD: add configurations for graphics cards 2021-03-24 02:18:03 +01:00
Jörg Thalheim 758bc63af2 Merge pull request #186 from khumba/system76 2021-03-23 09:57:23 +00:00
Jörg Thalheim 681ffa8a8c Merge pull request #227 from winterqt/surface-control 2021-03-23 08:05:13 +00:00
Winter 6075b4d856 fix import 2021-03-22 16:48:20 -04:00
GürkanandJörg Thalheim 6406b7ae3f Add MSI GS60 2QE (#224)
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2021-03-21 15:28:09 +00:00
Winter bf19677a5f nixfmt 2021-03-17 15:46:55 -04:00
Winter 007f1d8a07 Merge branch 'master' into surface-control 2021-03-17 15:45:28 -04:00
Winter d3cd9a2229 microsoft-surface: add surface-control 2021-03-14 22:11:17 -04:00
Jörg Thalheim 31f61b90dd Merge pull request #230 from mexisme/microsoft/surface/firmware-surface-go 2021-03-13 16:14:14 +00:00
mexisme 055971b825 Merge branch 'up/master' into microsoft/surface/firmware-surface-go 2021-03-13 08:23:20 +13:00
Jörg Thalheim 831de9cac9 Merge pull request #236 from pmeiyu/master
ThinkPad X270: Disable Panel Self Refresh
2021-03-09 09:16:23 +00:00
Peng Mei Yu cca70642e8 ThinkPad X270: Disable Panel Self Refresh. 2021-03-09 13:41:09 +08:00
mexisme bfbb77e8f1 Use fetchFromGitHub instead of fetchgit 2021-03-06 22:48:50 +13:00
mexisme 523d8efb5d Should have used HTTP instead of SSH 2021-03-06 22:24:34 +13:00
mexisme 91162d3f17 Merge branch 'up/master' into microsoft/surface/firmware-surface-go 2021-03-06 22:18:02 +13:00
Jörg Thalheim 720d531b1c Merge pull request #235 from mexisme/microsoft/surface/kernel/update-5.10.19 2021-03-06 08:31:16 +00:00
mexisme 94f7c2cb9c Mark as done 2021-03-06 20:56:06 +13:00
mexisme 920bffdfbc Disable some modules that aren't yet fully supported by the patches 2021-03-06 17:58:57 +13:00
mexisme be4115ae23 Update the module options 2021-03-06 17:49:59 +13:00
mexisme 61210f5e44 Update to kernel 5.10.19
- Add kernel 5.10.19 and latest linux-surface patches
- Remove kernel 5.10.2

commit 7250b8cbb4
Author: mexisme <wildjim+dev@kiwinet.org>
Date:   Fri Feb 5 08:38:10 2021 +1300

commit 90b210dfee
Author: mexisme <wildjim+dev@kiwinet.org>
Date:   Fri Feb 5 08:37:41 2021 +1300

commit bbb5dec0e3
Author: mexisme <wildjim+dev@kiwinet.org>
Date:   Tue Feb 2 23:58:51 2021 +1300

commit bde79616d2
Author: mexisme <wildjim+dev@kiwinet.org>
Date:   Tue Feb 2 23:58:35 2021 +1300

commit be5b9c91ac
Author: mexisme <wildjim+dev@kiwinet.org>
Date:   Tue Feb 2 23:57:54 2021 +1300
2021-03-06 17:37:13 +13:00
mexisme 6f392a3ffb Merge branch 'up/master' into microsoft/surface/firmware-surface-go 2021-03-06 15:40:10 +13:00
mexisme 98d19435d0 Rename cfg option from "enable" --> "replace"
- Allows for @qzed's kernel patch: https://github.com/linux-surface/kernel/commit/22ef83836c4aa89e9eb98de9b47ed24b6c2a1d45
2021-03-06 15:38:17 +13:00
mexisme 128b64dada Relative path of repos not updated correctly 2021-03-06 11:28:12 +13:00
mexisme 6972d78ffb Remove (obsolete) Surface Go QCA6174 K1535 firmware binary 2021-03-06 11:07:43 +13:00
mexisme e274b742e1 Use the ath10k QCA6174 K1535 firmware backup repo, instead 2021-03-05 08:33:27 +13:00
Jörg Thalheim 3caaa0588e Merge pull request #233 from thiagokokada/add-nvidia-disable-profile
Add nvidia-disable profile
2021-03-03 17:35:12 +00:00
Thiago Kenji Okada 36094450fd Add nvidia-disable profile
This is already used in XPS 15-9560, but instead of defining it in XPS
15-9560 let's create a separate profile and expose it for those who want
to disable their NVIDIA GPU.
2021-02-28 13:51:46 -03:00
Jörg Thalheim c9b965a43e Merge pull request #207 from mitchmindtree/xps-9310 2021-02-27 21:10:57 +00:00
mitchmindtree c41f572654 Dell XPS 13 to flake.nix 2021-02-27 19:58:57 +01:00
mitchmindtree f361f64db0 Remove no-longer-necessary modprobe config for audio. Fixes microphone.
It seems that `sof-firmware` has since been updated and the
`extraModprobeConfig` is no longer necessary! Microphone input also now
seems to work nicely.
2021-02-27 12:54:54 +01:00
mitchmindtree d1e64db4c5 Enable QCA6390 bluetooth
Adds a patch for missing kernel configuration along with a list of
kernel modules that are missing by default.
2021-02-27 12:36:44 +01:00
mexisme 4f6aad61b6 Update linux-surface/linux-surface Rev & SHA256 2021-02-27 22:41:53 +13:00
mexisme 9e7cd653f9 Fix repo source for K1535 2021-02-27 22:37:38 +13:00
mexisme 311c6bf0ef Ref to backup repo for Surface Go firmware 2021-02-27 22:37:38 +13:00
mexisme e901e80233 Remove obsolete repo ref 2021-02-27 22:37:38 +13:00
mexisme 4bbf156238 Update README 2021-02-27 22:37:38 +13:00
mitchmindtree 0359644c22 Pin to Linux 5.10.18 for patches. Remove upstreamed wi-fi firmware.
Pin to the latest stable 5.10.18 release in order to ensure patches
don't unexpectedly conflict in newer linux versions.

The wi-fi firmware has since been upstreamed to the `linux-firmware`
repo, and as such is now available via `enableRedistributableFirmware`.
As a result we can remove the old expr that pulled the firmware from
kvalo's github.

Also removes two patches that have since been upstreamed.
2021-02-26 12:43:00 +01:00
mitchmindtree cc5d84ccef Update to rebased patches for 5.10 release of kernel
Removes the old disable-mhi-2 patch file in favour of using the patch at
kernel.org.

Also adds fwupd to allow users to update their firmware via fwupdmgr.
2021-02-26 12:43:00 +01:00
mitchmindtree 08d1c4dd2b Add wink patch for disabling MHI M2 state. Rename firmware.
Disabling the MHI M2 state appears to completely resolve issues where
enabling the wifi firmware would cause the the whole system to freeze
quite frequently. The reason for why this fix works so well is still
unknown and under investigation. See some discussion here:

http://lists.infradead.org/pipermail/ath11k/2020-December/000876.html

Also renames the firmware package to clarify that it is for the wifi
driver. This is to avoid confusion with the bluetooth firmware which
will be added in an upcoming patch.
2021-02-26 12:43:00 +01:00
mitchmindtree 7f1da4009b Add wink patch for IRQ locking 2021-02-26 12:43:00 +01:00
mitchmindtree 154350aa04 Use fetchpatch. Fix kernel version. Add recent ath11k patches. 2021-02-26 12:43:00 +01:00
mitchmindtree cdea79566b Use fetchFromGitHub to retrieve qca6390 fw more efficiently
Addresses @terinjokes comment [here][1].

[1]: https://github.com/NixOS/nixos-hardware/pull/207/files/906cd8b20cad90a9da37fae5c17527b9ae4e3c42#pullrequestreview-542698197
2021-02-26 12:43:00 +01:00
mitchmindtree b60b1f95eb Remove explicit sof-firmware as is already included
Previously, I'd added both the firmware and the `extraModprobeConfig`
that selects the DSP driver, however it seems only the latter is
necessary.

Addresses @terinjokes comment [here][1].

[1]: https://github.com/NixOS/nixos-hardware/pull/207/files#r534062750
2021-02-26 12:43:00 +01:00
mitchmindtree f0486916bf Add a new suite of ath11k patches recommended by kvalo
Here's a link to kvalo's branch with the kernel patches:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/log/?h=ath11k-qca6390-bringup

> In this tag there's now a brand new implementation for suspend, which
> relies that the platform provides power to QCA6390 during suspend. Not
> all platforms do, but most of them should do that. ath11k also prints a
> warning whenever it notices that the firmware has crashed, but I'm not
> sure yet if it (the MHI subsystem to be exact) can detect every case.
>
> The MSI patch is mostly the same, it had just some refactoring since the
> last version. Unfortunately there's no solution still for the weird
> crashes some people are seeing.

The patches are based on version 5.10-rc4 of linux, so you'll want to
use `linuxPackages_testing`.
2021-02-26 12:43:00 +01:00
mitchmindtree b23e492fe5 Add entry for Dell XPS 13 9310 to README 2021-02-26 12:43:00 +01:00
mitchmindtree 3345b81777 Install qca6390 firmware necessary for ax500 connectivity chip 2021-02-26 12:43:00 +01:00
mitchmindtree bcbbd2bd72 Blacklist pmouse as trackpad works over i2c 2021-02-26 12:43:00 +01:00
mitchmindtree 631011a23c Add necessary fw and alsa conf for audio. Add patch for AX500. 2021-02-26 12:43:00 +01:00
mitchmindtree 86d77642bd Add xps 13 9310 with common intel and laptop imports 2021-02-26 12:43:00 +01:00
mexisme f8c3b6e50e Move a modprobe option for Surface Go Wifi device (ath10k) into that specific derivative 2021-02-23 17:59:34 +13:00
mexisme eb2721b3f1 A few more details about using K1535 WiFi firmware 2021-02-23 17:48:50 +13:00
mexisme a9b2d0e3f1 Update to a clearer directory-structure 2021-02-23 12:40:08 +13:00
mexisme 56f4b2df00 Add MS Surface Range to the README.md 2021-02-23 08:28:27 +13:00
mexisme 77aa0ff827 Merge branch 'master' of github.com:NixOS/nixos-hardware into microsoft/surface/firmware-surface-go 2021-02-23 08:24:07 +13:00
Jörg Thalheim 115770eed0 Merge pull request #232 from malteneuss/patch-1
Fix link to flake file in README flake example
2021-02-16 05:38:26 +00:00
malteneuss 0e2334c531 Fix link to flake file in README flake example 2021-02-13 20:59:31 +01:00
John Ericson 0cb5491af9 Merge pull request #220 from NixOS/dell-xps-9550-nvidia
Copy NVidia 9500 NVidia settings for 9550
2021-02-10 13:17:02 -05:00
mexisme be2f416029 Update TODO.org 2021-02-09 17:19:58 +13:00
mexisme 72002dabdc Update README.md 2021-02-09 17:17:27 +13:00
John Ericson a989fd823e Mention Dell 9550 NVidia in Read Me and flake.nix 2021-02-08 18:25:17 -05:00
John Ericson b22284989a Merge remote-tracking branch 'origin/master' into dell-xps-9550-nvidia 2021-02-08 18:23:20 -05:00
mexisme 08076a7b73 Add initial metadata attribute for the additional source 2021-02-07 15:53:09 +13:00
mexisme f9378480c0 Fix the output hash for the additional source 2021-02-07 15:52:22 +13:00
mexisme 080c44106f A temporary hack to install the Surface Go firmware 2021-02-07 13:31:26 +13:00
Jörg Thalheim 3657e7c334 Merge pull request #229 from tfc/add-lenovo-x13-yoga
Add Lenovo X13 Yoga Gen 1
2021-02-06 20:42:53 +00:00
Jacek Galowicz f59106598e Add Lenovo X13 Yoga Gen 1 2021-02-06 18:33:03 +01:00
mexisme 9a35571829 Interim version of trying to update Surface Go Wifi in-place
- Can't seem to d/l the K1535 board firmware directly from Killer Networking?
2021-02-07 00:55:27 +13:00
WinterandJörg Thalheim d6a1231181 Add the Microsoft Surface configuration to flakes.nix (#226)
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2021-02-02 21:21:59 +00:00
mexisme a0d8383c42 Port of linux-surface/linux-surface Kernel patches to NixOS (#221) 2021-01-23 06:36:37 +00:00
Jörg Thalheim 874830945a Merge pull request #223 from will-clarke/patch-1
Update flake.nix
2021-01-12 05:46:13 +00:00
William Clarke f0719aa6d1 Update flake.nix
I think there may have been a typo - it makes more sense to me to name macbook pro with `pro`. 🤷 😃
2021-01-11 20:39:04 +00:00
Jörg Thalheim fb1682bab4 Merge pull request #222 from Mic92/fix-ci
raspberry-2: remove console.extraTTYs
2021-01-06 06:53:13 +00:00
Jörg Thalheim fd89332b4a raspberry-2: remove console.extraTTYs
This option is no longer needed. Also remove boot.extraTTYs since
NixOS is older than 20.03 is no longer supported.
2021-01-06 07:42:50 +01:00
John Ericson 6484d285c5 Copy NVidia 9500 NVidia settings for 9550 2020-12-28 19:46:47 -05:00
Jörg Thalheim c242378e63 Merge pull request #218 from yorickvP/master 2020-12-25 17:46:30 +00:00
Yorick van Pelt 1ea590a853 dell/xps/9360: drop <20.03 support 2020-12-21 16:10:28 +01:00
Yorick van Pelt 0a0e0a2e49 dell/xps/9360: drop qca6174 firmware
This was used because the firmware in linux-firmware was outdated.
It should not be after a year.
2020-12-21 16:04:41 +01:00
Jörg Thalheim 87522b29a2 Merge pull request #217 from blitz/l14-amd
lenovo/thinkpad/l14/amd: update iommu comment
2020-12-06 11:28:23 +00:00
Julian Stecklina dc5fa221b2 lenovo/thinkpad/l14/amd: update iommu comment 2020-12-05 14:02:07 +01:00
Jörg Thalheim 025c7a2a7e Merge pull request #216 from erdnaxe/master
dell/g3/3779: init
2020-12-01 17:17:15 +00:00
Alexandre Iooss 060c89b69f dell/g3/3779: init
Add support for the Dell G3 3779.
2020-12-01 15:19:30 +01:00
Jörg Thalheim 6531786e2d Merge pull request #215 from sevenfourk/patch-5
apple/macbook-pro/12-1: brcmfmac: mention resume issue
2020-12-01 13:09:14 +00:00
Ivan Kovnatsky b371da6e8d apple/macbook-pro/12-1: brcmfmac: mention resume issue 2020-12-01 14:42:01 +02:00
Ivan KovnatskyandJörg Thalheim 34c1bf11bb apple/macbook-pro/12-1: PM: set cpuFreqGovernor and power Up/Down commands (#214)
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-12-01 08:57:29 +00:00
Jörg Thalheim abfae8841b Merge pull request #212 from bbigras/patch-1
flake.nix: add dell-xps-13-9343
2020-11-26 09:33:49 +01:00
Bruno Bigras 0db1582e2a flake.nix: add dell-xps-13-9343 2020-11-26 02:58:02 -05:00
Jörg Thalheim 21ed8edd62 Merge pull request #213 from NixOS/dependabot/github_actions/cachix/install-nix-action-v12 2020-11-26 08:46:57 +01:00
Jörg Thalheim e64aafa1ff set nixpkgs to unstable 2020-11-26 08:34:03 +01:00
dependabot[bot] 1a2c40134f build(deps): bump cachix/install-nix-action from v10 to v12
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from v10 to v12.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v10...07da2520eebede906fbeefa9dd0a2b635323909d)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-26 07:32:06 +00:00
Jörg Thalheim 08d900d475 add dependabot 2020-11-26 08:31:05 +01:00
Jörg Thalheim 40ade7c034 Merge pull request #206 from sevenfourk/master 2020-11-05 11:19:39 +01:00
Ivan Kovnatsky 25c35ed7b7 lenovo/thinkpad/t14: added desc to README.md and flake.nix 2020-11-05 11:39:23 +02:00
Ivan Kovnatsky 8b04c30d8b lenovo/thinkpad/t14: created symlink to t14s/ 2020-11-04 13:16:12 +02:00
Jörg Thalheim 1b4ce6426f Merge pull request #202 from sevenfourk/patch-3 2020-11-03 09:36:17 +01:00
Ivan Kovnatsky 6a0f1a9e84 macbook: add README.md to describe switching Cmd and Alt/AltGr 2020-11-03 10:19:25 +02:00
Jörg Thalheim 26e9c94511 Merge pull request #204 from oxzi/x260-i915
lenovo/thinkpad/x260: i915.enable_psr=0 parameter
2020-11-03 08:53:36 +01:00
Jörg Thalheim 2a9ea518bd Merge pull request #203 from oxzi/x260-tlp
lenovo/thinkpad/x260: use services.tlp.settings
2020-11-03 08:53:05 +01:00
Alvar Penning fd644de340 lenovo/thinkpad/x260: i915.enable_psr=0 parameter
The video driver causes short freezes from time to time, especially if
an external monitor is attached. Adding the i915.enable_psr=0 kernel
parameter mitigates those freezes.

This is a known problem for the X260, as mentioned in the Arch Wiki. It
occurred mainly after switching to kernel version five.
2020-10-31 16:11:04 +01:00
Alvar Penning de6811f14d lenovo/thinkpad/x260: use services.tlp.settings
With switching from NixOS 20.03 to 20.09, the services.tlp.extraConfig
option became deprecated and was replaced by services.tlp.settings.

The ThinkPad X260 is only device within nixos-hardware which makes use
of this configuration.
2020-10-31 15:59:40 +01:00
sevenfourk d2ac7fb650 macbook: added option for swapped cmd and opt
https://wiki.archlinux.org/index.php/Apple_Keyboard#Switching_Cmd_and_Alt/AltGr
2020-10-31 12:06:55 +02:00
Jörg Thalheim 46a68df837 Merge pull request #199 from dadada/dadada/t14s 2020-10-29 19:21:30 +01:00
dadada 04c79afe1c t14s: add AMD Gen1 model
t14s: fix minimum required kernel version
2020-10-26 09:13:38 +01:00
dadada 81b5488961 t14s: add comment
Add commend about suspending to RAM and fingerprint sensor.
2020-10-26 01:07:23 +01:00
Jörg Thalheim 3cffbd5961 Merge pull request #198 from dadada/dadada/t14s
t14s: init
2020-10-25 21:18:32 +01:00
dadada 42ec21a27c t14s: init
Copied from t495.
2020-10-25 19:50:39 +01:00
Jörg Thalheim e8c5f886b0 Merge pull request #86 from yegortimoshenko/201810/ath3k
common/pc: disable ath3k if non-free firmware is not available
2020-10-20 06:37:54 +02:00
Jörg Thalheim 653f7ba3ca Merge pull request #196 from Mic92/eval-errors
raspberry-2: fix evaluation warning
2020-10-20 06:35:43 +02:00
Jörg Thalheim 770dbcdb49 Merge pull request #195 from candeira/thinkpad_x220_sandy-bridge 2020-10-20 06:35:01 +02:00
Jörg Thalheim 986f101a66 raspberry-2: fix evaluation warning 2020-10-20 06:25:14 +02:00
Jörg Thalheim b3827275b7 Merge pull request #194 from blitz/l14-amd
Add support for the Lenovo Thinkpad L14 (AMD) laptop
2020-10-15 02:12:51 +02:00
Julian Stecklina ccf7985cb3 lenovo/thinkpad/l14: init
Add support for the Lenovo Thinkpad L14 Gen 1 Intel and AMD variants.
2020-10-15 00:37:49 +02:00
Javier Candeira d43b95a86e Fix fetchGit instructions 2020-10-13 22:55:46 +11:00
Javier Candeira 7234b11dff Thinkpad x220 has Sandy Bridge CPU 2020-10-13 22:12:23 +11:00
Bryan Gardiner fdc0812787 system76: Remove kernel param ec_sys.write_support=1.
I don't think we need this in the generic configuration.  There is a call to
`modprobe ec_sys.write_support=1` in system76-driver, only for the airplane mode
daemon (which only applies to certain models, not including darp6), and the
driver executes the modprobe call anyhow.

Also the kernel's documentation for the parameter says:

    write_support:Dangerous, reboot and removal of battery may be needed. (bool)

So let's only enable this where it's required.
2020-10-12 18:06:11 -07:00
Bryan Gardiner d86324ba69 system76: Update configs to use the module from Nixpkgs. 2020-10-12 18:06:03 -07:00
Jörg Thalheim 55acbf7497 Merge pull request #192 from hoppla20/master 2020-10-12 04:53:07 +02:00
hoppla20 9d36eb67f2 Update default.nix 2020-10-01 07:54:29 +02:00
Vincent Cui f3eb1498e9 Added e470 to flake.nix and changing contributing section in README.md 2020-09-27 17:21:23 +02:00
Vincent Cui b175484c5a fix lenovo thinkpad e470 2020-09-23 20:08:23 +02:00
Vincent Cui 9bc1f316a6 add lenovo thinkpad e470 2020-09-23 08:06:47 +02:00
Vincent Cui 338792821a add e470 configuration 2020-09-23 08:01:20 +02:00
Jörg Thalheim 684eaddf74 Merge pull request #190 from marius851000/common
permit to access config in common/ via the flake
2020-09-13 19:43:52 +02:00
marius david 4e3aa0b6ce added access to common/ via flake.nix 2020-09-13 16:35:01 +02:00
Bryan Gardiner 602f9d86c6 Add options for applying the darp6 headset fixup. 2020-09-12 22:33:04 -07:00
Bryan Gardiner 0c5f176147 Add support for System76 hardware, specifically the Darter Pro 6.
This relies on new `system76`, `system76-acpi`, and `system76-io`
packages in `linuxPackages` in Nixpkgs.
2020-09-03 19:03:10 -07:00
Jörg Thalheim f2b06f530e Merge pull request #188 from symphorien/precision5530
add dell precision 5530
2020-08-30 19:15:25 +01:00
Symphorien Gibol 31f1498247 add dell precision 5530 2020-08-30 12:00:00 +00:00
Jörg Thalheim 984c72f653 Merge pull request #185 from Mic92/asus-fx504gd
Asus TUF FX504GD
2020-08-13 22:10:46 +01:00
ImExtends c75ebd4129 Add Asus TUF FX504GD 2020-08-13 21:43:19 +01:00
Jörg Thalheim 741b3ba508 lenovo/thinkpad/x1/7th-gen: fix evaluation 2020-08-13 15:01:48 +02:00
Jörg Thalheim 55f9eb6a73 Merge pull request #178 from bahaynes/master 2020-07-30 05:47:09 +01:00
bahaynes cc72f59d5a Removed tlp configuration.
Should be set correctly after https://github.com/NixOS/nixpkgs/pull/94064
is merged.
2020-07-29 20:51:08 -04:00
Jörg Thalheim b5a87414c6 Merge pull request #181 from Mic92/fetchgit 2020-07-28 10:06:37 +01:00
Jörg Thalheim eb070c346b README.md: document fetchgit
fixes #65
2020-07-28 09:56:17 +01:00
Jörg Thalheim ad72510a2b Merge pull request #180 from afreakk/master 2020-07-28 07:59:45 +01:00
bahaynes d56b2e96a6 Updated default (non-NVIDIA) config.
Removed xps-common, and migrated it to default.nix.
2020-07-27 13:00:20 -04:00
BenandJörg Thalheim 8e984dc856 Update dell/xps/15-9500/default.nix
Update intel drivers to default (Modesetting).

Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-07-27 10:11:53 -04:00
afreakk 823f0bc77f dell/xps/13-9360: conflicting font fix 2020-07-26 12:59:49 +02:00
bahaynes b7a5f1188f Moved NVIDIA config to common, and updated README. 2020-07-25 23:53:47 -04:00
bahaynes 6ffcdbacc5 Added dell xps 15-9500, with nvidia gpu. 2020-07-23 13:03:50 -04:00
Jörg Thalheim cc353d439e Merge pull request #176 from Mic92/flakes
add flake support
2020-07-06 16:22:31 +01:00
Jörg Thalheim 618819cc49 add flake support 2020-07-06 14:49:08 +01:00
Jörg Thalheim 62f453938f Merge pull request #174 from bbigras/9343
add xps 13 (9343)
2020-07-06 14:28:22 +01:00
Bruno Bigras 1ab852b88e add xps 13 (9343) 2020-07-05 10:46:39 -04:00
Jörg Thalheim 841caf7d20 Merge pull request #175 from Mic92/dell-fixes
dell/xps/13-7390: wifi fixes
2020-06-24 20:16:02 +01:00
Jörg Thalheim 5faf94b86f dell/xps/13-7390: wifi fixes 2020-06-23 20:12:57 +01:00
Jörg Thalheim a78b8b6476 Merge pull request #172 from Mic92/readme 2020-06-21 14:35:19 +01:00
Jörg Thalheim 6efc6af71a README.md: fix librem link 2020-06-21 14:32:53 +01:00
Jörg Thalheim 80a32af201 replace travis with github action
This way we get the latest nix.
2020-06-21 14:24:28 +01:00
Jörg Thalheim 373856f3e1 README: list is complete now 2020-06-21 09:14:32 +01:00
Jörg Thalheim 9146011f0b README.md: update description of the project 2020-06-21 08:50:28 +01:00
Jörg Thalheim 2f2c2d9ef5 Merge pull request #169 from erikarvstedt/improve-laptop-preset 2020-05-20 15:35:48 +01:00
Jörg Thalheim 385c5ba916 Merge pull request #168 from Mic92/tests 2020-05-20 15:34:34 +01:00
Erik Arvstedt 90868c67e8 pc/laptop: remove redundant cpuFreqGovernor setting
This setting has been part of NixOS since version 16.09
2020-05-20 16:29:50 +02:00
Jörg Thalheim a13d00bd7c tests: hide evaluation command behind verbose flag 2020-05-18 11:38:36 +01:00
Jörg Thalheim 4b129a0f71 fix toshiba/swanky evaluation (#167) 2020-05-18 11:27:18 +01:00
Jörg Thalheim 75a850cb3e Merge pull request #166 from Mic92/cleanup-readme 2020-05-17 16:00:13 +01:00
Jörg Thalheim eae378658f Merge pull request #164 from phunehehe/x1 2020-05-17 15:59:34 +01:00
Hoang Xuan Phu 8c320bbc8a lenovo/thinkpad/x1/7th-gen: init 2020-05-17 09:22:51 -04:00
Jörg Thalheim 744d5561be README.md: add missing link 2020-05-17 08:07:37 +01:00
Jörg Thalheim 718eaeed75 Merge pull request #165 from Mic92/quiet-tests 2020-05-17 08:02:22 +01:00
Jörg Thalheim 5f830cf8fc make tests less verbose 2020-05-17 07:56:56 +01:00
Jörg Thalheim a36f343222 Merge pull request #163 from 00-matt/dell-xps-13-9360/consolefont 2020-05-15 07:43:50 +01:00
Matthew Smith 69b9bdd53a dell/xps/13-9360: Stop using i18n.consoleFont
trace: warning: The option `i18n.consoleFont' defined in
`/nix/var/nix/profiles/per-user/root/channels/nixos-hardware/dell/xps/13-9360'
has been renamed to `console.font'.
2020-05-14 22:55:22 +01:00
Jörg Thalheim 8e8e65ba45 Merge pull request #161 from alyssais/pixelbook 2020-05-07 17:41:06 +01:00
Alyssa Ross 16cdc10b48 google/pixelbook: init 2020-05-07 15:26:58 +00:00
Jörg Thalheim 565f837027 Merge pull request #131 from asymmetric/imd 2020-05-07 13:21:57 +01:00
Matthias Beyer 130560e553 Add InfinityBook v4 (#159) 2020-05-05 23:20:10 +01:00
Jörg Thalheim 4ef357fe8b Merge pull request #158 from ehmry/master 2020-05-05 12:47:32 +01:00
Emery Hemingway d7d897fe24 New dell/latitude/3480
The touchpad is painful to use unless the "psmouse" kernel module
is disabled.
2020-05-05 01:24:25 +05:30
Jörg Thalheim d928c96e3c Merge pull request #156 from delan/patch-1 2020-04-24 10:35:50 +01:00
Delan Azabani 7efd48f100 README: fix nix-channel --update command
Following the current instructions yields these errors for some reason:

```
$ sudo nixos-rebuild switch
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)
/tmp/nixos-rebuild.vs4JVw/nix
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
building the system configuration...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
```
2020-04-24 18:36:40 +10:00
Wout Mertens bb1a8b78ba wiki syntax 2020-04-23 10:53:17 +02:00
Wout Mertens c8e3843b0a 7390: clarify intent 2020-04-23 10:52:16 +02:00
Jörg Thalheim c71abe67b9 Merge pull request #155 from Mic92/remove-thresholds 2020-04-21 21:11:45 +01:00
Jörg Thalheim 41d2c3322b Revert "Change TLP charge thresholds"
This reverts commit 76f681355c.

This setting is opinionated and should be left to the user.
See: https://github.com/NixOS/nixos-hardware/pull/154#issuecomment-617181517
2020-04-21 21:10:18 +01:00
Jörg Thalheim 16336614d3 Merge pull request #154 from j0hax/x230-tlp-thresholds 2020-04-21 11:48:33 +01:00
j0hax 76f681355c Change TLP charge thresholds 2020-04-21 03:47:11 +02:00
Jörg Thalheim e58c64a03c Merge pull request #153 from DamienCassou/fix-t460s
Improve support for t460s
2020-04-15 09:06:43 +01:00
Damien Cassou 157ae443af lenovo/thinkpad/t460s: Add missing acpi_call module
This is required by tlp for battery management.
2020-04-14 22:54:52 +02:00
Damien Cassou 0ef7d22b6c lenovo/thinkpad/t460s: Remove problematic options
See there links for details:

https://github.com/NixOS/nixos-hardware/pull/134#pullrequestreview-336181593
https://github.com/NixOS/nixos-hardware/pull/134#discussion_r361146814
2020-04-14 22:54:31 +02:00
Jörg Thalheim edb7199b5c Merge pull request #152 from ngiger/librem15v3
Added Librem15v3
2020-03-26 16:45:57 +00:00
Niklaus Giger 12bb72aa6b Create separate directories for librem 13v3 and 15v3 2020-03-26 17:43:33 +01:00
Niklaus Giger 9238b5f06e Automatically lock the desktop when removing the librem key 2020-03-23 20:21:11 +01:00
Niklaus Giger c6722b86bf Document librem laptop 15v3 2020-03-23 20:19:54 +01:00
Jörg Thalheim f4364f2457 Merge pull request #150 from danderson/master
thinkpad/t495: fix backlight save/load and and battery conditioning.
2020-03-15 18:37:21 +00:00
David Anderson 03dedf4cfd thinkpad/t495: fix backlight save/load and and battery conditioning.
Saving/loading the backlight state requires the acpi_backlight=native
kernel parameter.

acpi_call is required by TLP to get access to battery conditioning
information from the firmware.

Signed-off-by: David Anderson <dave@natulte.net>
2020-03-14 20:57:22 -07:00
Jörg Thalheim 9f6d639110 Merge pull request #149 from danderson/master
lenovo/thinkpad/t495: init from e495.
2020-03-12 09:12:30 +00:00
David Anderson 3d983701f9 lenovo/thinkpad/t495: init from e495.
The E495 and T495 are based on the same core Ryzen platform, so the
E495 tweaks apply similarly to the T495.

Tested on my own T495, works well.
2020-03-11 09:34:12 -07:00
Jörg Thalheim 62d7c2eddf Merge pull request #147 from Mic92/fix-travis
travis: parallelize evaluation and limit RAM usage
2020-03-11 09:46:57 +00:00
Jörg Thalheim 62a1812f3c Update README.wiki 2020-03-03 17:31:54 +00:00
Jörg Thalheim 9c952961f1 Add parallel test runner
The new test runner will evaluate all test profiles from the README.md
in parallel in separate nix-build processes.
Since we do not load all processes into one process,
this also helps saving memory.
2020-02-23 21:29:22 +00:00
Jörg Thalheim 5904e7605c Merge pull request #139 from danielstaleiny/master
Adding Dell XPS 15 9560
2020-02-18 13:52:09 +00:00
Daniel Rafaj 26454a206d add xps 9560 root readme to be able to easily find 2020-02-18 13:25:25 +01:00
Daniel Rafaj 8b50556e2d Add xps 9560 with its own quirks, I added versions:
1 default one, with nvidia working and intel working, needs optirun to
run application with nvidia
2 intel only, I am using this as my daily driver for long time, only
intel is turned on and nvidia is turned off and doesn't drain any
power.
3 nvidia only, intel is dissabled and nvidia is picked as default gpu,
no need to fiddle with optirun etc, good for gpu heavy application.

All these settings needs to reboot to work properly
2020-02-18 13:25:25 +01:00
Rebecca Turner 74efa57ee4 Support NixOS 19.09 for <dell/xps/15-7590> (#141)
Virtual console options were renamed in 20.03; use `console.earlySetup`
or `boot.earlyVconsoleSetup` depending on OS version.

https://github.com/NixOS/nixos-hardware/pull/114#discussion_r374953204
2020-02-18 11:13:15 +00:00
Jörg Thalheim 7accb4efab Merge pull request #143 from Mic92/xps-15-7590
xps/15-7590: don't enable unfree firmware by default
2020-02-17 10:54:44 +00:00
Jörg Thalheim 9506048413 Merge pull request #146 from Mic92/e495
thinkpad/e495: fix evaluation
2020-02-12 10:58:44 +00:00
Jörg Thalheim f5a4954ca3 thinkpad/e495: fix evaluation
fixes #145
2020-02-12 10:57:40 +00:00
Jörg Thalheim 859cd11263 Merge pull request #144 from Luis-Hebendanz/master
Added profile for issues 69289
2020-02-12 10:06:38 +00:00
Luis Hebendanz 6c7550d0b4 Added entry Thnikpad E495 to README 2020-02-12 10:56:49 +01:00
Luis HebendanzandJörg Thalheim f6e2381344 Update lenovo/thinkpad/e495/default.nix
Co-Authored-By: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-02-12 10:52:49 +01:00
Luis Hebendanz d75b12a962 Added profile for issues 69289 2020-02-11 19:42:02 +01:00
Jörg Thalheim 6f502bc6e6 Merge pull request #138 from rummik/add-lenovo-thinkpad-l13
Add Lenovo ThinkPad L13 profile
2020-02-09 09:09:19 +00:00
Jörg Thalheim 67814a0d5c Merge pull request #142 from 9999years/7590
Add Dell XPS 15-7590 suggested options
2020-02-09 08:47:08 +00:00
Jörg Thalheim 6587634ad8 xps/15-7590: don't enable unfree firmware by default
Also don't set nixpkgs.pkgs. Instead just add an overlay.
2020-02-09 08:40:38 +00:00
Rebecca Turner 521f680999 Add Dell XPS 15-7590 suggested options
These suggested options are taken from my configuration but aren't quite
universal enough to be enabled by default.
2020-02-07 09:55:01 -05:00
Jörg Thalheim 2ab4e61b32 Revert "xps-15-7590: convert wiki to markdown."
This reverts commit 77983d16f6.

apparently github can link to wiki text fine.
2020-02-04 12:04:56 +00:00
Jörg Thalheim 4e19a42bd2 dell-xps-15-7590: fix README link 2020-02-04 12:03:13 +00:00
Jörg Thalheim 77983d16f6 xps-15-7590: convert wiki to markdown.
This allows it to symlink it in the README
2020-02-04 12:00:38 +00:00
Jörg Thalheim 5758237cbc README.md: link to dell xps 15-7590 2020-02-04 11:53:51 +00:00
Jörg Thalheim cc7140b4bf Merge pull request #114 from tomberek/master
Initial 15-7590
2020-02-04 11:52:02 +00:00
Tom Bereknyei 22a16c801c Apply suggestions from 9999years 2020-02-01 21:12:29 -05:00
Tom Bereknyei 3f1a5617bf Make note about EFI and remove 5.1 kernel hardcode 2020-02-01 20:49:06 -05:00
tomberekandJörg Thalheim f128fbbdd6 Update dell/xps/15-7590/README.wiki
Co-Authored-By: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-02-01 20:49:06 -05:00
Tom Bereknyei 53ca456f60 Suggested fixes 2020-02-01 20:49:06 -05:00
Tom Bereknyei 64afb7c12d Wifi fixed by removing iwlwifi-cc-a0-48.ucode 2020-02-01 20:49:06 -05:00
Tom Bereknyei 814bd1a024 Initial 15-7590 2020-02-01 20:49:06 -05:00
*Kim Zick c30e20594b Update README.md 2020-01-07 10:04:52 -05:00
*Kim Zick (rummik) 6081bfd6d5 Add Lenovo ThinkPad L13 profile 2020-01-02 11:35:56 -05:00
Jörg Thalheim 89c4ddb0e6 Merge pull request #137 from mishudark/x280
Add Lenovo ThinkPad X280 profile
2019-12-31 16:15:24 +00:00
mishudark 1d746f2298 Add Lenovo ThinkPad X280 profile 2019-12-31 15:38:59 +01:00
Alexander Berlind c3b2ac63ff Add deepsleep to avoid wakeups during sleep mode (#136) 2019-12-28 09:50:04 +00:00
Lorenzo Manacorda 19b4d5cede intel: add intel-media-driver
Provides hardware accelerated video playback from Broadwell onwards.
2019-11-11 20:39:59 +01:00
Yegor Timoshenko 3d337906f5 common/pc: disable ath3k if non-free firmware is not available 2018-10-30 19:40:51 +00:00
87 changed files with 2323 additions and 125 deletions

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
+15
View File
@@ -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
-2
View File
@@ -1,2 +0,0 @@
language: nix
script: nix-build release.nix --dry-run --show-trace
+1
View File
@@ -5,3 +5,4 @@ lenovo/thinkpad/x230 @makefu @yegortimoshenko
lenovo/thinkpad/x250 @Mic92
pcengines/apu @yegortimoshenko
purism/librem/13v3 @yegortimoshenko
system76/darp6 @khumba
+104 -3
View File
@@ -1,12 +1,14 @@
NixOS profiles covering hardware quirks.
NixOS profiles to optimize settings for different hardware.
## Setup
### Using channels
Add and update `nixos-hardware` channel:
```
$ sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
$ sudo nix-channel --update nixos-hardware
$ sudo nix-channel --update
```
Then import an appropriate profile path from the table below. For example, to
@@ -20,7 +22,46 @@ imports = [
];
```
## Incomplete list of Profiles
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.
@@ -33,56 +74,116 @@ See code for all available configurations.
| 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
+11
View File
@@ -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
+15
View File
@@ -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.
+14 -2
View File
@@ -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"
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
../../common/cpu/intel
../../common/pc/laptop
];
#Nouveau doesn't work at all on this model.
boot.kernelParams = [ "nouveau.modeset=0" ];
}
+1
View File
@@ -10,5 +10,6 @@
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
}
+17
View File
@@ -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;
};
}
+5
View File
@@ -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" ];
}
+10
View File
@@ -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" ];
}
+22
View File
@@ -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
};
}
+5 -1
View File
@@ -1,5 +1,9 @@
{ lib, ... }:
{ config, lib, ... }:
{
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
"ath3k"
];
services.xserver.libinput.enable = lib.mkDefault true;
}
-6
View File
@@ -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;
}
+24
View File
@@ -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"
];
}
+14
View File
@@ -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" ];
}
+22
View File
@@ -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"
];
}
+4
View File
@@ -1,5 +1,9 @@
= 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].
+6
View File
@@ -7,5 +7,11 @@
../../../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;
}
+258
View File
@@ -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;
}
+12
View File
@@ -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;
}
-10
View File
@@ -14,16 +14,6 @@
systemd-boot.enable = lib.mkDefault true;
};
hardware.firmware = lib.mkBefore [ pkgs.qca6174-firmware ];
# TODO: move to general HiDPI profile
i18n.consoleFont = lib.mkDefault "latarcyrheb-sun32"; # 4K screen, use bigger console font
# TODO: upstream to NixOS/nixpkgs
nixpkgs.overlays = [(final: previous: {
qca6174-firmware = final.callPackage ./qca6174-firmware.nix {};
})];
# This will save you money and possibly your life!
services.thermald.enable = true;
}
-26
View File
@@ -1,26 +0,0 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "${target}-firmware-${version}";
version = "${branch}-00042";
branch = "4.4.1.c1";
target = "QCA6174";
src = fetchurl {
url = "https://github.com/kvalo/ath10k-firmware/raw/952afa4949cb34193040cd4e7441e1aee50ac731/${target}/hw3.0/${branch}/firmware-6.bin_RM.${version}-QCARMSWP-1";
sha256 = "01vvz3qhqw5l3yilcqgk1spk4y9k4qy7na7a57cbl037r231szdh";
};
buildCommand = ''
install -D $src $out/lib/firmware/ath10k/${target}/hw3.0/firmware-6.bin
'';
meta = with stdenv.lib; {
description = "Updated firmware for the qca6174 wireless chip";
homepage = "https://github.com/kvalo/ath10k-firmware/tree/master/QCA6174/hw3.0";
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ yorickvp ];
platforms = platforms.linux;
};
}
+54
View File
@@ -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 ===
+43
View File
@@ -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";
});
})
];
}
+22
View File
@@ -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.
+21
View File
@@ -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;
}
+15
View File
@@ -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";
};
}
+205
View File
@@ -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 -->
+8 -1
View File
@@ -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 ==
+2 -3
View File
@@ -4,6 +4,8 @@
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
@@ -12,7 +14,4 @@
# 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;
}
+15
View File
@@ -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";
};
}
+54
View File
@@ -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
+24
View File
@@ -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";
}
+10
View File
@@ -0,0 +1,10 @@
{ lib, pkgs, ... }:
{
imports = [
../../../../common/cpu/intel
../../../../common/pc/laptop
../../../../common/gpu/nvidia-disable.nix
../xps-common.nix
];
}
+20
View File
@@ -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";
}
+12
View File
@@ -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;
}
+104
View File
@@ -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;
};
};
}
+9
View File
@@ -0,0 +1,9 @@
{ ... }:
{
imports = [
../../common/pc/laptop
../../common/pc/laptop/ssd
../../common/cpu/intel/kaby-lake
];
}
+19
View File
@@ -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;
}
+11
View File
@@ -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;
}
+10
View File
@@ -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;
}
+23
View File
@@ -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;
}
+14
View File
@@ -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"
];
}
+10
View File
@@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
{
imports = [
../.
../../../../common/cpu/intel
];
services.throttled.enable = lib.mkDefault true;
}
+1
View File
@@ -0,0 +1 @@
t14s/
+11
View File
@@ -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 = [
../.
];
}
+20
View File
@@ -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;
}
+9
View File
@@ -0,0 +1,9 @@
{ config, lib, pkgs, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop/acpi_call.nix
../.
];
}
+1 -4
View File
@@ -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;
}
+16
View File
@@ -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;
}
+15
View File
@@ -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
'';
}
+7
View File
@@ -0,0 +1,7 @@
{
imports = [
../.
../../../../common/pc/laptop/acpi_call.nix
./audio.nix
];
}
+13
View File
@@ -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;
}
+12
View File
@@ -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" ];
}
+9
View File
@@ -0,0 +1,9 @@
{ config, lib, pkgs, ... }:
{
imports = [
../.
../../../common/pc/laptop/hdd
../tp-smapi.nix
];
}
+1 -1
View File
@@ -3,7 +3,7 @@
{
imports = [
../.
../../../common/cpu/intel
../../../common/cpu/intel/sandy-bridge
../../../common/pc/laptop/hdd # TODO: reverse compat
../tp-smapi.nix
];
+8 -3
View File
@@ -5,8 +5,13 @@
../../../common/pc/laptop/acpi_call.nix
];
boot.kernelParams = [
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X260#Thinkpad_X260
"i915.enable_psr=0"
];
# https://wiki.archlinux.org/index.php/TLP#Btrfs
services.tlp.extraConfig = ''
SATA_LINKPWR_ON_BAT=med_power_with_dipm
'';
services.tlp.settings = {
SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
};
}
+5
View File
@@ -3,4 +3,9 @@
../.
../../../common/cpu/intel
];
boot.kernelParams = [
# Disable "Panel Self Refresh". Fix random freezes.
"i915.enable_psr=0"
];
}
+12
View File
@@ -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 -6
View File
@@ -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 ];
}
+94
View File
@@ -0,0 +1,94 @@
# Derivatives for Microsoft Surface notebooks
These derivatives use the patches from the [linux-surface repo](https://github.com/linux-surface/linux-surface/tree/master/patches).
## Kernel
The kernel needs several patches to make it work correctly with some of the hardware on various
Surface models, e.g. keyboard/trackpad, camera, wifi.
Not all hardware is fully supported, but the
[linux-surface feature matrix](https://github.com/linux-surface/linux-surface/wiki/Supported-Devices-and-Features#feature-matrix)
provides details on which devices are supported on which types of machine.
The kernel-specific derivations are under the `kernel/` sub-directory.
In order to simplify maintenance of the Nix code, only the most-recent kernel patch-set is expected
to be maintained in this repo.
_*NOTE:*_ Some built-in Kernel config items need to be set, that aren't set by default:
- https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
## Firmware, Drivers and Support Tools
### WiFi
For the Surface Go, please see the "Issues" sections below.
### IPTS
IPTS is used on most of the Surface range, except for Surface Go and Surface Laptop 3 (AMD version).
Older kernels used specialised firmware which used a method that's no longer supported by the
more-recent kernels.
Newer kernels use the kernel-space `intel-precise-touch` driver and user-space `ipstd` daemon.
The `iptsd` daemon works with the `intel-precise-touch` driver to convert raw touch data from the
kernel-space driver into events for the HID / input sub-system.
- https://github.com/linux-surface/iptsd
- https://github.com/linux-surface/intel-precise-touch
- _*NOTE:*_ The patches from this repo are included in the above kernel patches, already.
### DTX, `surface-control`
#### surface-control
For controlling the performance modes and other aspects of the device, the [`surface-control`](https://github.com/linux-surface/surface-control) tool is included.
To be able to control the performance mode without using `sudo`, add your user to the `surface-control` group.
# ToDo's Not Done
See: [TODO.org](./TODO.org)
# Issues
## TLP daemon
TLP is known to cause problems on Surface unless correctly configured.
See: https://github.com/linux-surface/linux-surface/blob/master/README.md
## Wifi Firmware for Surface Go
On the Surface Go, the standard firmware from the official Linux Firmware repo has issues with the
`ath10k` QCA6174 Wifi device.
You will see messages like "Can't ping firmware".
The most effective fix to-date is to remove the `board-2.bin` file or replace it with a copy of the
`board.bin` file.
The derivative in `firmware/surface-go/ath10k/` can configure this, if you set the option
`config.hardware.microsoft-surface.firmware.surface-go-ath10k.replace` to `true`.
_*NOTE:*_ This is destructive, as it deletes all the `board.bin` and `board-2.bin` files for the
`ath10k` QCA6174 device, and replaces them with KillerNetworking's version.
This is the only way (currently) to force the driver to use the new firmware.
For more details, see: https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wifi-firmware
_*NOTE:*_ There's some work to patch the kernel to make it easier to override which firmware file
to use for QCA6174, which would obviate this more-destructuve approach:
- https://github.com/linux-surface/kernel/commit/22ef83836c4aa89e9eb98de9b47ed24b6c2a1d45
_*NOTE:*_ There was an attempt to get this firmware incorporated into the aggregate `board-2.bin`,
but (as of this writing) the request appears to have been ignored:
- https://github.com/linux-surface/linux-surface/issues/41
References:
- https://github.com/jakeday/linux-surface/issues/441
- https://www.reddit.com/r/SurfaceLinux/comments/e8quqg/surface_go_official_wifi_fix/
- https://hackmd.io/@dasgeek/ryA5i5Dor
- https://github.com/thebitstick/surfacego-wifi
- https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ath10k
- https://wireless.wiki.kernel.org/en/users/drivers/ath10k/firmware
+55
View File
@@ -0,0 +1,55 @@
* Kernel Patching
** DONE Create derivative to patch kernel 5.10.2
- Latest from linux-surface
- [X] Download github.com/linux-surface/linux-surface kernel patches
- [X] Build kernel using downloaded patches
** CANCELLED Create a function for selecting preferred kernel
** DONE Fix how Keyboard & Trackpad are not being enabled on SL3
- https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
** DONE Update to kernel 5.10.19
:LOGBOOK:
- State "DONE" from "DOING" [2021-03-06 Sat 20:55]
:END:
* Firmware
** DONE Remove old firmware binaries
- Looks like the ath10k files aren't needed, any more
** DONE Create derivative for `ipts` firmware
- [X] Download github.com/linux-surface/surface-ipts-firmware firmware
- [X] Install the binaries
** DONE Remove `ipts` firmware derivative
- This is only needed on the 4.19 kernel
** DONE Investigate problem with ath10k wifi firmware on Surface Go
:LOGBOOK:
- State "DOING" from "TODO" [2021-02-09 Tue 17:19]
- State "DONE" from "DOING" [2021-03-06 Sat 15:27]
:END:
*** DONE README entry explaining problem(s) with nonfree firmware on Surface Go
:LOGBOOK:
- State "DONE" from "TODO" [2021-02-09 Tue 17:17]
:END:
*** DONE Create derivative for `ath10k` firmware on Surface Go
:LOGBOOK:
- State "DOING" from "TODO" [2021-02-09 Tue 17:18]
:END:
- [X] Download github.com/kvalo/ath10k-firmware ?
- [X] Download kernel.org linux-firmware?
- [X] Download `board.bin` from Killer Networks?
- [X] Install ath10k firmware fix for Surface Go
- `board-2.bin` needs to be removed / replaced with `board.bin`
- [X] Add a config option for enabling the Surface Go Firmware
- [-] Replace the vendorised `board.bin` with a `fetchurl`
- Getting HTTP 406 when using `fetchurl` or `nix-prefetch-url` that has to be diagnosed
* Support Tools
** TODO Incorporate @hpfr's function(s) from this commit:
- https://github.com/hpfr/system/commit/03fa1b0a83f8a336e812910d0d50f5247a8a630c
** TODO Create derivative for `iptsd` touch-screen daemon
- [ ] Download
- [ ] Install binary
- [ ] Enable via systemd
** TODO Create derivative to patch and rebuild libwacom
- github.com/linux-surface/libwacom-surface
- The plan is to do this in a separate PR against `nixpkgs` instead of `nixos-hardware`
** TODO Create derivative to install `surface-control`
- Download github.com/linux-surface/surface-control
** TODO Create derivative to install `surface-dtx-daemon`
- Download github.com/linux-surface/surface-dtx-daemon
+8
View File
@@ -0,0 +1,8 @@
{ config, lib, pkgs, ... }: {
imports =
[ ./kernel ./hardware_configuration.nix ./firmware/surface-go/ath10k ];
environment.systemPackages = with pkgs; [ surface-control ];
users.groups.surface-control = { };
services.udev.packages = [ pkgs.surface-control ];
}
@@ -0,0 +1,33 @@
{stdenv, lib, pkgs, firmwareLinuxNonfree, ...}:
let
repos = (pkgs.callPackage ../../../repos.nix {});
# killernetworking_firmware = ./K1535_Debian;
killernetworking_firmware = repos.ath10k-firmware + "/K1535_Debian";
in
firmwareLinuxNonfree.overrideAttrs (old: rec {
pname = "microsoft-surface-go-firmware-linux-nonfree";
srcs = [
firmwareLinuxNonfree.src
killernetworking_firmware
];
sourceRoot = firmwareLinuxNonfree.src;
dontMakeSourcesWritable = true;
postInstall = ''
# Delete the non-working firmware:
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board.bin
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board-2.bin
# Install the Surface Go Wifi firmware:
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/
cp ${killernetworking_firmware}/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/
'';
outputHash = "1nc56qii96dfvxnv3ad3lxz2rzyqcbldk0h9rbm3l2pgamkvj8dw";
meta = with lib; {
description = "Standard binary firmware collection, adjusted with the Surface Go WiFi firmware";
platforms = platforms.linux;
priority = 5;
};
})
@@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hardware.microsoft-surface.firmware.surface-go-ath10k;
in
{
options = {
hardware.microsoft-surface.firmware.surface-go-ath10k = {
replace = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
};
};
config = lib.mkIf cfg.replace {
hardware.enableAllFirmware = true;
hardware.firmware = [
(pkgs.callPackage ./ath10k-replace.nix {})
];
boot.extraModprobeConfig = lib.mkDefault ''
options ath10k_core skip_otp=Y
'';
};
}
@@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
boot.extraModprobeConfig = lib.mkDefault ''
options i915 enable_fbc=1 enable_rc6=1 modeset=1
options snd_hda_intel power_save=1
options snd_ac97_codec power_save=1
options iwlwifi power_save=Y
options iwldvm force_cam=N
'';
boot.kernelParams = [ "mem_sleep_default=deep" ];
# NOTE: Check the README before enabling TLP:
services.tlp.enable = lib.mkDefault false;
hardware.sensor.iio.enable = lib.mkDefault true;
}
+5
View File
@@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
{
boot.kernelPackages = pkgs.callPackage ./linux-5.10.19 {};
}
@@ -0,0 +1,125 @@
{ config, lib, pkgs, ... }:
let
repos = (pkgs.callPackage ../../repos.nix {});
patches = repos.linux-surface + "/patches";
surface_kernelPatches = [
{ name = "microsoft-surface-patches-linux-5.10.19";
patch = null;
extraConfig = ''
#
# Surface Aggregator Module
#
SURFACE_AGGREGATOR m
SURFACE_AGGREGATOR_ERROR_INJECTION n
SURFACE_AGGREGATOR_BUS y
SURFACE_AGGREGATOR_CDEV m
SURFACE_AGGREGATOR_REGISTRY m
SURFACE_ACPI_NOTIFY m
SURFACE_DTX m
SURFACE_PERFMODE m
SURFACE_HID m
SURFACE_KBD m
BATTERY_SURFACE m
CHARGER_SURFACE m
#
# These built-in modules are required for the Surface Aggregator Module
# See: https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
#
SERIAL_DEV_BUS y
SERIAL_DEV_CTRL_TTYPORT y
#
# Surface Hotplug
#
SURFACE_HOTPLUG m
#
# IPTS touchscreen
#
# This only enables the user interface for IPTS data.
# For the touchscreen to work, you need to install iptsd.
#
MISC_IPTS m
#
# Cameras: IPU3
#
## Not yet supported in the patches
# VIDEO_IPU3_IMGU m
VIDEO_IPU3_CIO2 m
CIO2_BRIDGE y
INTEL_SKL_INT3472 m
#
# Cameras: Sensor drivers
#
VIDEO_OV5693 m
## Not yet supported in the patches
# VIDEO_OV8865 m
#
# ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7
#
APDS9960 m
#
# Other Drivers
#
INPUT_SOC_BUTTON_ARRAY m
SURFACE_3_BUTTON m
SURFACE_3_POWER_OPREGION m
SURFACE_PRO3_BUTTON m
SURFACE_GPE m
SURFACE_BOOK1_DGPU_SWITCH m
'';
}
{
name = "ms-surface/0001-surface3-oemb";
patch = patches + "/5.10/0001-surface3-oemb.patch";
}
{
name = "ms-surface/0002-wifi";
patch = patches + "/5.10/0002-wifi.patch";
}
{
name = "ms-surface/0003-ipts";
patch = patches + "/5.10/0003-ipts.patch";
}
{
name = "ms-surface/0004-surface-gpe";
patch = patches + "/5.10/0004-surface-gpe.patch";
}
{
name = "ms-surface/0005-surface-sam-over-hid";
patch = patches + "/5.10/0005-surface-sam-over-hid.patch";
}
{
name = "ms-surface/0006-surface-sam";
patch = patches + "/5.10/0006-surface-sam.patch";
}
{
name = "ms-surface/0007-surface-hotplug";
patch = patches + "/5.10/0007-surface-hotplug.patch";
}
{
name = "ms-surface/0008-surface-typecover";
patch = patches + "/5.10/0008-surface-typecover.patch";
}
{
name = "ms-surface/0009-surface-sensors";
patch = patches + "/5.10/0009-surface-sensors.patch";
}
{
name = "ms-surface/0010-cameras";
patch = patches + "/5.10/0010-cameras.patch";
}
];
in (with pkgs; recurseIntoAttrs (linuxPackagesFor (
callPackage ./linux-5.10.19.nix {
kernelPatches = surface_kernelPatches;
}
)))
@@ -0,0 +1,18 @@
{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
with lib;
buildLinux (args // rec {
version = "5.10.19";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = versions.majorMinor version;
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "1mml5a30ky0khzj3r6ahybycbbszk86agq62qclwq2kzvsqbprr7";
};
} // (args.argsOverride or {}))
+29
View File
@@ -0,0 +1,29 @@
{ lib, pkgs, fetchFromGitHub, fetchurl }:
{
linux-surface = fetchFromGitHub {
owner="linux-surface";
repo="linux-surface";
rev="f8fab978a480a4ed57e9ebb6928683b2e443c1c5";
sha256="0zwybprwjckpapxm6gxzh6hwdd1w91g5sjxn6z52zlvvjpkmw959";
};
ath10k-firmware = fetchFromGitHub {
owner="kvalo";
repo="ath10k-firmware";
rev="84b47062aab31d67156e0a3ef593a6999a12864b";
sha256="0l8wfj8z4jbb31nzqkaxisby0n6061ix01c5di9bq66iby59j8py";
};
surface-go-ath10k-firmware_upstream = fetchurl {
url="https://support.killernetworking.com/K1535_Debian/board.bin";
# url="https://www.killernetworking.com/support/K1535_Debian/board.bin";
sha256="0l8wfj8z4jbb31nzqkaxisby0n6061ix01c5di9bq66iby59j8py";
};
surface-go-ath10k-firmware_backup = fetchFromGitHub {
owner="mexisme";
repo="linux-surface_ath10k-firmware";
rev="74e5409e699383d6ca2bc4da4a8433d16f3850b1";
sha256="169vgvxpgad9anmchs22fj5qm6ahzjfdnwhd8pc280q705vx6pjk";
};
}
+29
View File
@@ -0,0 +1,29 @@
{ config, pkgs, lib, ... }:
{
imports = [
../../common/cpu/intel
../../common/pc/laptop
];
boot = {
# Interferes with Fn- action keys
kernelParams = [ "video.report_key_events=0" ];
# Workaround for problematic firmware loading
extraModprobeConfig = ''
options ath10k_core skip_otp=y
'';
};
# Laptop can't correctly suspend if wlan is active
powerManagement = {
powerDownCommands = ''
${pkgs.utillinux}/bin/rfkill block wlan
'';
resumeCommands = ''
${pkgs.utillinux}/bin/rfkill unblock wlan
'';
};
}
+75
View File
@@ -1,3 +1,6 @@
This config is for [Librem 13v3](https://puri.sm/products/librem-13/) and [15v3](https://puri.sm/products/librem-15/) Laptops from Purism.
Librem comes with Coreboot + SeaBIOS payload. That means EFI boot is not
possible. Use `fdisk` to partition hard drive, and GRUB as a bootloader:
@@ -10,3 +13,75 @@ possible. Use `fdisk` to partition hard drive, and GRUB as a bootloader:
};
}
```
## Adding a PureOS partition to the GRUB menu
I first assume that `boot.loader.grub.useOSProber = true;` should be sufficient.
However GRUB was not able to identify the disks correctly and it took me several
reinstallation till setting `boot.loader.grub.fsIdentifier= "provided";` and using
boot.loader.grub.extraEntries allowed me to dual boot NixOS and PureOS.
Be aware that each time the PureOS updates the /boot/grub/grub.cfg you will be unable
to boot into NixOS unless you patch grub.cfg manually again.
Therefore: If you want to be able to boot into your old PureOS distribution
add the following lines, assuming that you have a separate boot partition
Adapt linux version and the UUID to your disk!!
```nix
{
boot.loader.grub.useOSProber = false;
boot.loader.grub.fsIdentifier= "provided";
boot.loader.grub.extraEntries = ''
menuentry "PureOS with linux 4.19.0-5-amd64 on /dev/sdb2 " {
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 ef7a4dcf-8cc4-4870-b860-3ed64906f9b9
else
search --no-floppy --fs-uuid --set=root ef7a4dcf-8cc4-4870-b860-3ed64906f9b9
fi
linux /vmlinuz-4.19.0-5-amd64 root=UUID=43899f26-04f2-4ccb-b52a-c9441f1a1a6d ro quiet splash resume=UUID=923317f8-d8bb-4e1f-bca3-f36a556de609 # $vt_handoff
initrd /initrd.img-4.19.0-5-amd64
};
}
```
## Automatically lock the desktop when removing the librem key
The [instructions](https://docs.puri.sm/Librem_Key/Getting_Started/User_Manual.html#automatically-lock-the-desktop-when-removing-the-librem-key) to lock the screen after unplugging the [Librem Key](https://puri.sm/products/librem-key/#overview) don't work under NixOS.
This snippet works on my Librem 15v3 laptop running KDE without wayland and is using the xlock from the package xlockmore.
```nix
{ pkgs, services , systemd, ... }:
let
libremScreenSaver = pkgs.writeScriptBin "libremScreenSaver" ''
#!${pkgs.bash}/bin/bash
user=`ps aux | egrep "start_kdeinit|gdm-(wayland|x)-session"| head -n 1 | awk '{print $1}'`
if [ -n "$user" ]; then
sudo -u $user DISPLAY=:0 xlock 2>&1 | logger lockScreen for user $user
else
logger libremScreenSaver failed to find a user. Not running KDE?
fi
'';
in {
services.udev.path = [ pkgs.procps pkgs.logger pkgs.gawk pkgs.xlockmore ];
services.udev.extraRules = ''
ACTION=="remove", ENV{PRODUCT}=="316d/4c4b/101" RUN+="${pkgs.systemd}/bin/systemctl --no-block start lockScreen@%k.service"
'';
systemd.services."lockScreen@" = {
bindsTo = [ "dev-%i.device"] ;
path = [ pkgs.procps pkgs.logger pkgs.sudo pkgs.xlockmore pkgs.gawk ] ;
serviceConfig = {
Type = "oneshot"; # was simple
ExecStart = "${libremScreenSaver}/bin/libremScreenSaver %I";
};
};
}
```
+1
View File
@@ -0,0 +1 @@
13v3/
+2 -3
View File
@@ -3,8 +3,7 @@
{
boot = {
consoleLogLevel = lib.mkDefault 7;
extraTTYs = [ "ttyAMA0" ];
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi;
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi2;
kernelParams = [
"dwc_otg.lpm_enable=0"
"console=ttyAMA0,115200"
@@ -16,7 +15,7 @@
generationsDir.enable = lib.mkDefault false;
raspberryPi = {
enable = lib.mkDefault true;
version = lib.mkDefault 2;
version = lib.mkDefault 2;
};
};
};
+21
View File
@@ -0,0 +1,21 @@
{ lib, pkgs, ...}:
{
imports = [
./modesetting.nix
];
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi4;
initrd.availableKernelModules = [ "usbhid" "usb_storage" "vc4" ];
loader = {
grub.enable = lib.mkDefault false;
generic-extlinux-compatible.enable = lib.mkDefault true;
};
};
# Required for the Wireless firmware
hardware.enableRedistributableFirmware = true;
}
+107
View File
@@ -0,0 +1,107 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hardware.raspberry-pi."4".fkms-3d;
in
{
options.hardware = {
raspberry-pi."4".fkms-3d = {
enable = lib.mkEnableOption ''
Enable modesetting through fkms-3d
'';
cma = lib.mkOption {
type = lib.types.int;
default = 512;
description = ''
Amount of CMA (contiguous memory allocator) to reserve, in MiB.
The foundation overlay defaults to 256MiB, for backward compatibility.
As the Raspberry Pi 4 family of hardware has ample amount of memory, we
can reserve more without issue.
Additionally, reserving too much is not an issue. The kernel will use
CMA last if the memory is needed.
'';
};
};
};
config = lib.mkIf cfg.enable {
# Configure for modesetting in the device tree
hardware.deviceTree = {
filter = "bcm2711-rpi-*.dtb";
overlays = [
# Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/cma-overlay.dts
{
name = "rpi4-cma-overlay";
dtsText = ''
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@0 {
target = <&cma>;
__overlay__ {
size = <(${toString cfg.cma} * 1024 * 1024)>;
};
};
};
'';
}
# Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
{
name = "rpi4-vc4-fkms-v3d-overlay";
dtsText = ''
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@1 {
target = <&fb>;
__overlay__ {
status = "disabled";
};
};
fragment@2 {
target = <&firmwarekms>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&v3d>;
__overlay__ {
status = "okay";
};
};
fragment@4 {
target = <&vc4>;
__overlay__ {
status = "okay";
};
};
};
'';
}
];
};
# Also configure the system for modesetting.
services.xserver.videoDrivers = lib.mkBefore [
"modesetting" # Prefer the modesetting driver in X11
"fbdev" # Fallback to fbdev
];
};
}
-54
View File
@@ -1,54 +0,0 @@
{ ... }:
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;
}
+97
View File
@@ -0,0 +1,97 @@
# Hardware profile for the Darter Pro 6 laptop by System76.
#
# https://system76.com/laptops/darter
#
# Regarding kernel modules, darp6 needs system76-acpi-dkms, not system76-dkms:
#
# [1] https://github.com/pop-os/system76-dkms/issues/39
# jackpot51> system76-acpi-dkms is the correct driver to use on the darp6
#
# system76-io-dkms also appears to be loaded on darp6 with Pop!_OS, and
# system76-dkms does not, and in fact refuses to load.
{ config, lib, options, pkgs, ... }:
let
cfg = config.hardware.system76.darp6;
# Allow silencing the warning about these options if either is defined.
soundSettingsDefined =
options.hardware.system76.darp6.soundVendorId.isDefined ||
options.hardware.system76.darp6.soundSubsystemId.isDefined;
# We neeed both options non-null to be able to apply the headset fixup though.
soundSettingsAvailable =
soundSettingsDefined &&
(cfg.soundVendorId != null && cfg.soundSubsystemId != null);
in
{
imports = [
../.
../../common/pc/laptop
../../common/pc/laptop/ssd
];
options.hardware.system76.darp6 = {
soundVendorId = lib.mkOption {
type = with lib.types; nullOr (strMatching "0x[0-9a-f]{8}");
description = ''
The vendor ID of the sound card PCI device, for applying the headset fixup.
This should be set to the value of the following file on your Darter Pro:
/sys/class/sound/hwC0D0/vendor_id
If this option has the default null value, then the headset fixup will
not be applied.
'';
};
soundSubsystemId = lib.mkOption {
type = with lib.types; nullOr (strMatching "0x[0-9a-f]{8}");
description = ''
The subsystem ID of the sound card PCI device, for applying the headset fixup.
This should be set to the value of the following file on your Darter Pro:
/sys/class/sound/hwC0D0/subsystem_id
If this option has the default null value, then the headset fixup will
not be applied.
'';
};
};
config = lib.mkMerge [
{
warnings = lib.optional (!soundSettingsDefined) ''
For full Darter Pro support, set the options:
- hardware.system76.darp76.soundVendorId
- hardware.system76.darp76.soundSubsystemId
You can copy these values directly from:
- /sys/class/sound/hwC0D0/vendor_id
- /sys/class/sound/hwC0D0/subsystem_id
The headset audio fixup will not be applied without these values.
Set these options to null to silence this warning.
'';
}
# Apply the headset fixup patch from system76-driver, if the necessary
# options have been provided.
#
# See occurrences of "darp" in:
# https://github.com/pop-os/system76-driver/blob/master/system76driver/actions.py
# https://github.com/pop-os/system76-driver/blob/master/system76driver/products.py
(lib.mkIf soundSettingsAvailable {
boot.extraModprobeConfig = ''
options snd-hda-intel model=headset-mode-no-hp-mic patch=system76-audio-patch
'';
hardware.firmware = [
(pkgs.writeTextFile {
name = "system76-audio-patch";
destination = "/lib/firmware/system76-audio-patch";
text = ''
[codec]
${cfg.soundVendorId} ${cfg.soundSubsystemId} 0
[pincfg]
0x1a 0x01a1913c
'';
})
];
})
];
}
+10
View File
@@ -0,0 +1,10 @@
# Implementation of support for general System76 hardware.
#
# https://system76.com/
{ config, lib, ... }:
{
imports = [ ../common/pc ];
hardware.system76.enableAll = lib.mkDefault true;
}
+19
View File
@@ -0,0 +1,19 @@
{ profile }:
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;
};
};
in (import <nixpkgs/nixos> {
configuration.imports = [ profile shim ];
}).system
Executable
+116
View File
@@ -0,0 +1,116 @@
#!/usr/bin/env nix-shell
#!nix-shell --quiet -p nix -p python3 -i python
import argparse
import multiprocessing
import re
import subprocess
import sys
from functools import partial
from pathlib import Path
from typing import List, Tuple
TEST_ROOT = Path(__file__).resolve().parent
ROOT = TEST_ROOT.parent
GREEN = "\033[92m"
RED = "\033[91m"
RESET = "\033[0m"
def parse_readme() -> List[str]:
profiles = set()
with open(ROOT.joinpath("README.md")) as f:
for line in f:
results = re.findall(r"<nixos-hardware/[^>]+>", line)
profiles.update(results)
return list(profiles)
def build_profile(
profile: str, verbose: bool
) -> Tuple[str, subprocess.CompletedProcess]:
# Hard-code this for now until we have enough other architectures to care about this.
system = "x86_64-linux"
if "raspberry-pi/2" in profile:
system = "armv7l-linux"
cmd = [
"nix",
"build",
"-f",
"build-profile.nix",
"-I",
f"nixos-hardware={ROOT}",
"--show-trace",
"--system",
system,
"--arg",
"profile",
profile,
]
# uses import from derivation
if profile != "<nixos-hardware/toshiba/swanky>":
cmd += ["--dry-run"]
if verbose:
print(f"$ {' '.join(cmd)}")
res = subprocess.run(
cmd, cwd=TEST_ROOT, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True,
)
return (profile, res)
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Run hardware tests")
parser.add_argument(
"--jobs",
type=int,
default=multiprocessing.cpu_count(),
help="Number of parallel evaluations."
"If set to 1 it disable multi processing (suitable for debugging)",
)
parser.add_argument(
"--verbose", action="store_true", help="Print evaluation commands executed",
)
parser.add_argument("profiles", nargs="*")
return parser.parse_args()
def main() -> None:
args = parse_args()
if len(args.profiles) == 0:
profiles = parse_readme()
else:
profiles = args.profiles
failed_profiles = []
def eval_finished(args: Tuple[str, subprocess.CompletedProcess]) -> None:
profile, res = args
if res.returncode == 0:
print(f"{GREEN}OK {profile}{RESET}")
else:
print(f"{RED}FAIL {profile}:{RESET}", file=sys.stderr)
if res.stdout != "":
print(f"{RED}{res.stdout.rstrip()}{RESET}", file=sys.stderr)
print(f"{RED}{res.stderr.rstrip()}{RESET}", file=sys.stderr)
failed_profiles.append(profile)
build = partial(build_profile, verbose=args.verbose)
if len(profiles) == 0 or args.jobs == 1:
for profile in profiles:
eval_finished(build(profile))
else:
pool = multiprocessing.Pool(processes=args.jobs)
for r in pool.imap(build, profiles):
eval_finished(r)
if len(failed_profiles) > 0:
print(f"\n{RED}The following {len(failed_profiles)} test(s) failed:{RESET}")
for profile in failed_profiles:
print(f"{sys.argv[0]} '{profile}'")
sys.exit(1)
if __name__ == "__main__":
main()
+5
View File
@@ -0,0 +1,5 @@
{
boot.kernelParams = [
"i8042.reset"
];
}