From 47e6064303317e2b9e0fbde5688c8d3c00295b68 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 18 Oct 2024 16:14:33 -0400 Subject: [PATCH] Khanda: cleanup hardware-configuration --- hosts/Khanda/hardware-configuration.nix | 30 ++----------------------- modules/system/bluetooth.nix | 3 ++- modules/ui/desktops/common.nix | 5 ++++- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/hosts/Khanda/hardware-configuration.nix b/hosts/Khanda/hardware-configuration.nix index 423bc2f..04f1edd 100644 --- a/hosts/Khanda/hardware-configuration.nix +++ b/hosts/Khanda/hardware-configuration.nix @@ -30,10 +30,12 @@ in initrd = { availableKernelModules = [ + "kvm-intel" "surface_aggregator" "surface_aggregator_registry" "surface_aggregator_hub" "surface_hid_core" + "surface_hid" "hid_multitouch" "8250_dw" "intel_lpss" @@ -46,36 +48,8 @@ in "surface_kbd" "pinctrl_tigerlake" ]; - kernelModules = [ - "surface_aggregator" - "surface_aggregator_registry" - "surface_aggregator_hub" - "surface_hid_core" - "surface_hid" - "hid_multitouch" - "8250_dw" - "intel_lpss" - "intel_lpss_pci" - "surface_kbd" - "pinctrl_tigerlake" - ]; }; - kernelModules = [ - "kvm-intel" - "surface_aggregator" - "surface_aggregator_registry" - "surface_aggregator_hub" - "surface_hid_core" - "surface_hid" - "hid_multitouch" - "8250_dw" - "intel_lpss" - "intel_lpss_pci" - "surface_kbd" - "pinctrl_tigerlake" - ]; - kernelParams = [ "pci=hpiosize=0" # Prevent ACPI interrupt storm. See https://github.com/linux-surface/linux-surface/wiki/Surface-Pro-9#acpi-interrupt-storm ]; diff --git a/modules/system/bluetooth.nix b/modules/system/bluetooth.nix index c6562b3..6d17790 100644 --- a/modules/system/bluetooth.nix +++ b/modules/system/bluetooth.nix @@ -14,6 +14,7 @@ in options = { aux.system.bluetooth = { enable = lib.mkEnableOption "Enables bluetooth."; + experimental.enable = lib.mkEnableOption "Enables experimental features, like device power reporting."; }; }; @@ -22,7 +23,7 @@ in hardware.bluetooth = { enable = true; powerOnBoot = true; - settings = { + settings = lib.mkIf cfg.experimental.enable { General = { Enable = "Source,Sink,Media,Socket"; Experimental = true; diff --git a/modules/ui/desktops/common.nix b/modules/ui/desktops/common.nix index edfd442..4b5862b 100644 --- a/modules/ui/desktops/common.nix +++ b/modules/ui/desktops/common.nix @@ -26,7 +26,10 @@ in config = lib.mkIf cfg.enable { aux.system = { - bluetooth.enable = true; + bluetooth = { + enable = true; + experimental.enable = true; + }; packages = with pkgs; [ qjournalctl # Journalctl frontend ];