overheating: add patched ssdt

This commit is contained in:
DashieTM 2024-05-21 18:23:59 +02:00
parent 5c0e020043
commit e536387ffe
9 changed files with 55 additions and 9 deletions

View file

@ -3,12 +3,13 @@
imports = [
../../modules/ironbar_config.nix
../../modules/boot_params.nix
./dsdt.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "overheating";
programs.ironbar.monitor = "eDP-1";
programs.ironbar.scale = "2.0";
programs.boot.boot_params = [ ];
programs.boot.boot_params = [ "rtc_cmos.use_acpi_alarm=1" ];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
}

View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
let
# credit to benley: https://github.com/benley/dotfiles/commit/325748c3a8553d55c9fab08654a77b252aa0fde7
patched_ssdt = pkgs.stdenv.mkDerivation {
name = "patched_ssdt";
src = ./.;
buildInputs = [ pkgs.libarchive ];
installPhase = ''
mkdir -p kernel/firmware/acpi
cp ${./ssdt6.aml} kernel/firmware/acpi/ssdt6.aml
mkdir -p $out
echo kernel/firmware/acpi/ssdt6.aml | bsdcpio -v -o -H newc -R 0:0 > $out/lenotrolli-ssdt.img
'';
};
in
{
boot.kernelParams = [ "mem_sleep_default=deep" ];
boot.initrd.prepend = [ "${patched_ssdt}/lenotrolli-ssdt.img" ];
}

Binary file not shown.