weee new laptoo

This commit is contained in:
Reid 2026-06-07 23:15:03 -07:00
parent c2af5792d1
commit 38b26a082f
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
14 changed files with 148 additions and 141 deletions

View file

@ -1,58 +0,0 @@
{ pkgs, lib, ... }:
{
# support power features such as suspend to ram
powerManagement.enable = true;
# tune power saving options on boot
powerManagement.powertop.enable = true;
# thermald proactively prevents overheating on intel CPUs and works well with other tools
services.thermald.enable = true;
# power-profile-daemon for power management
services.power-profiles-daemon.enable = true;
# manage fans for macbook devices
# see: https://github.com/GnomedDev/T2FanRD/blob/5b1c0c10785b8e8dfe124a4d6aaa7c2becdac65c/src/config.rs#L62
services.mbpfan.enable = false;
services.t2fanrd.enable = true;
services.t2fanrd.config.Fan1 = {
low_temp = 55;
high_temp = 75;
speed_curve = "linear";
always_full_speed = false;
};
# replace basic t2 kernel with cachyos kernel
# same patches and i trust it to be more up to date (one time the "latest" was EOL for t2,,,)
# also interesting how this supports l4 but my big computer doesn't...
boot.kernelPackages = lib.mkForce pkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-x86_64-v4;
# fix wifi firmware
hardware.apple-t2.firmware.enable = true;
# fix sleep/suspend
# ty https://github.com/3ulalia/flake/blob/aaddbef19979c6d952f7a763cd9e6225d6330a02/hosts/catalina/default.nix
systemd.services."suspend-fix-t2" = {
enable = true;
unitConfig = {
Description = "Disable and Re-Enable Apple BCE Module (and Wi-Fi)";
Before = "sleep.target";
StopWhenUnneeded = "yes";
};
serviceConfig = {
User = "root";
Type = "oneshot";
RemainAfterExit = "yes";
ExecStart = [
"/run/current-system/sw/bin/modprobe -r brcmfmac_wcc"
"/run/current-system/sw/bin/modprobe -r brcmfmac"
"/run/current-system/sw/bin/modprobe -r hci_bcm4377"
"/run/current-system/sw/bin/rmmod -f apple-bce"
];
ExecStop = [
"/run/current-system/sw/bin/modprobe apple-bce"
"/run/current-system/sw/bin/modprobe hci_bcm4377"
"/run/current-system/sw/bin/modprobe brcmfmac"
"/run/current-system/sw/bin/modprobe brmcfmac_wcc"
];
};
wantedBy = ["sleep.target"];
};
}

View file

@ -19,9 +19,7 @@
# debug
strace ltrace lsof crosspipe
# apps
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex pwvucontrol nautilus gnome-disk-utility gnome-text-editor baobab file-roller mission-center loupe gnome-weather kdePackages.kdenlive video-trimmer handbrake blanket blockbench
# compatibility
wineWow64Packages.waylandFull winetricks
firefox qalculate-gtk krita inkscape libreoffice-fresh vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex pwvucontrol nautilus gnome-disk-utility gnome-text-editor baobab file-roller mission-center loupe gnome-weather kdePackages.kdenlive video-trimmer handbrake blanket blockbench
# misc
bat file which packwiz yt-dlp fastfetch hyfetch trashy wev
# games
@ -99,7 +97,6 @@
# distractions
distractions.discord.enable = true;
distractions.discord.vesktop = true;
distractions.steam.enable = true;
# tools
tools.direnv.enable = true;
tools.easyeffects.enable = true;

View file

@ -3,27 +3,26 @@
{
imports =
[
inputs.hardware.nixosModules.apple-t2
(inputs.hardware + "/common/cpu/intel/ice-lake")
(inputs.hardware + "/common/gpu/intel/ice-lake")
inputs.asahi.nixosModules.apple-silicon-support
inputs.hardware.nixosModules.common-pc-laptop-ssd
inputs.hardware.nixosModules.common-pc-laptop
(modulesPath + "/installer/scan/not-detected.nix")
./apple-macbook-air-9-1.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.canTouchEfiVariables = false;
# this makes wi-fi and stuff like that work
# of course, as usual, this is broadcom to blame. Thanks!
hardware.asahi.peripheralFirmwareDirectory = "${pkgs.my.apple-silicon-firmware}/firmware";
modules.hardware = {
graphics.i915.enable = true;
audio.enable = true;
bluetooth.enable = true;
networking.enable = true;
@ -32,19 +31,19 @@
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0f09afdc-88e4-4764-818b-77828931278f";
fsType = "ext4";
{ device = "/dev/disk/by-uuid/be826617-c861-48a2-b135-87138c3d2c1a";
fsType = "btrfs";
options = [ "noatime" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5659-4909";
{ device = "/dev/disk/by-uuid/BD6E-1D12";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/f54a2257-f498-4ca0-82af-58f31705cce7"; }
[ { device = "/dev/disk/by-uuid/26ebd42b-1dd4-4f4e-935c-b5f9555562dd"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -54,6 +53,4 @@
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.end0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,3 +1,3 @@
{
system = "x86_64-linux";
system = "aarch64-linux";
}