Modularize hardware config and remove specific nix folder
This commit is contained in:
parent
a5042bb645
commit
9ac5b25036
72 changed files with 322 additions and 100 deletions
31
hardware/overheating/configuration.nix
Normal file
31
hardware/overheating/configuration.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
imports = [
|
||||
../../modules/conf.nix
|
||||
];
|
||||
conf = {
|
||||
monitor = "eDP-1";
|
||||
scale = "2.0";
|
||||
hostname = "overheating";
|
||||
boot_params = [ "rtc_cmos.use_acpi_alarm=1" ];
|
||||
ironbar.modules = [
|
||||
{ type = "upower"; class = "memory-usage"; }
|
||||
];
|
||||
hyprland = {
|
||||
monitor = [
|
||||
# default
|
||||
"eDP-1,2944x1840@90,0x0,2"
|
||||
|
||||
# all others
|
||||
",highres,auto,1"
|
||||
];
|
||||
extra_autostart = [ "hyprdock --server" ];
|
||||
};
|
||||
colorscheme = "catppuccin-mocha";
|
||||
};
|
||||
mods = {
|
||||
amdgpu.enable = true;
|
||||
kde_connect.enable = true;
|
||||
bluetooth.enable = true;
|
||||
acpid.enable = true;
|
||||
};
|
||||
}
|
||||
20
hardware/overheating/dsdt.nix
Normal file
20
hardware/overheating/dsdt.nix
Normal 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" ];
|
||||
}
|
||||
18
hardware/overheating/firmware.nix
Normal file
18
hardware/overheating/firmware.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
hardware.firmware = [
|
||||
(
|
||||
# lenovo is such a good manufacturer!!1!11!
|
||||
# credit for the binary files: https://github.com/darinpp/yoga-slim-7
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "firmware-lenotrolli";
|
||||
src = ./firmware;
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/firmware
|
||||
cp ${./firmware/TAS2XXX38BB.bin} $out/lib/firmware/TAS2XXX38BB.bin
|
||||
cp ${./firmware/TIAS2781RCA4.bin} $out/lib/firmware/TIAS2781RCA4.bin
|
||||
'';
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
BIN
hardware/overheating/firmware/TAS2XXX38BB.bin
Normal file
BIN
hardware/overheating/firmware/TAS2XXX38BB.bin
Normal file
Binary file not shown.
BIN
hardware/overheating/firmware/TIAS2781RCA4.bin
Normal file
BIN
hardware/overheating/firmware/TIAS2781RCA4.bin
Normal file
Binary file not shown.
BIN
hardware/overheating/firmware/TIAS2781RCA4.bin.orig
Normal file
BIN
hardware/overheating/firmware/TIAS2781RCA4.bin.orig
Normal file
Binary file not shown.
9
hardware/overheating/overheating.nix
Normal file
9
hardware/overheating/overheating.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
# special hardware modules
|
||||
# mostly to fix firmare and dsts
|
||||
imports =
|
||||
[
|
||||
./dsdt.nix
|
||||
./firmware.nix
|
||||
];
|
||||
}
|
||||
BIN
hardware/overheating/ssdt6.aml
Normal file
BIN
hardware/overheating/ssdt6.aml
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue