2020-12-29 02:38:20 +01:00
|
|
|
{ lib, pkgs, ... }: {
|
|
|
|
imports = [ ../../../common/cpu/intel ../../../common/pc/laptop ];
|
2020-11-14 19:13:48 +01:00
|
|
|
|
2020-12-05 16:56:31 +01:00
|
|
|
# Includes the Wi-Fi and Bluetooth firmware for the QCA6390.
|
2021-02-26 11:41:03 +01:00
|
|
|
hardware.enableRedistributableFirmware = true;
|
2020-11-14 18:27:04 +01:00
|
|
|
|
2021-08-18 17:53:34 +02:00
|
|
|
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest);
|
2021-07-27 01:33:28 +02:00
|
|
|
# TODO: upstream this to NixOS
|
|
|
|
boot.kernelPatches = [{
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
boot.kernelModules = [ "btqca" "hci_qca" "hci_uart" ];
|
2020-12-05 18:38:14 +01:00
|
|
|
|
2020-11-14 18:54:25 +01:00
|
|
|
# Touchpad goes over i2c.
|
|
|
|
# Without this we get errors in dmesg on boot and hangs when shutting down.
|
|
|
|
boot.blacklistedKernelModules = [ "psmouse" ];
|
|
|
|
|
2020-11-14 18:27:04 +01:00
|
|
|
# Allows for updating firmware via `fwupdmgr`.
|
2020-12-29 02:38:20 +01:00
|
|
|
services.fwupd.enable = true;
|
2020-11-14 17:14:41 +01:00
|
|
|
}
|