From 6e20173aad33da26830f04592267d7676cecd9e5 Mon Sep 17 00:00:00 2001 From: workflow <4farlion@gmail.com> Date: Tue, 10 Oct 2023 11:49:44 +0100 Subject: [PATCH] Revert "feat(flexbox): remove kernel hacks that are no longer needed" This reverts commit 3176d36370f3b27ed20ba2bf1caf461527626648. --- machines/flexbox/system.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/machines/flexbox/system.nix b/machines/flexbox/system.nix index e1d589f2..16806495 100644 --- a/machines/flexbox/system.nix +++ b/machines/flexbox/system.nix @@ -19,6 +19,26 @@ in boot.loader.efi.canTouchEfiVariables = false; # Disable this after first installation to not wear out EFI storage boot.consoleLogLevel = 7; + # Fix audio + # TODO: Upstream these modules to nixpkgs + boot.kernelPatches = [ + { + name = "enable-soundwire-drivers"; + patch = null; + extraConfig = '' + SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y + SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m + SND_SOC_RT1308 m + ''; + } + ]; + boot.extraModprobeConfig = '' + options snd-hda-intel model=auto, enable_msi=1 + ''; + + # https://lore.kernel.org/linux-nvme/YnR%2FFiWbErNGXIx+@kbusch-mbp/T/ + boot.kernelParams = [ "nvme_core.default_ps_max_latency_us=0" ]; + # GPU environment.systemPackages = [ nvidia-offload ]; services.xserver.videoDrivers = [ "nvidia" ];