Modularize hardware config and remove specific nix folder

This commit is contained in:
DashieTM 2024-07-20 01:56:54 +02:00
parent a5042bb645
commit 9ac5b25036
72 changed files with 322 additions and 100 deletions

View 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;
};
}

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" ];
}

View 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
'';
}
)
];
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,9 @@
{
# special hardware modules
# mostly to fix firmare and dsts
imports =
[
./dsdt.nix
./firmware.nix
];
}

Binary file not shown.