Rebase to flake parts #7

This commit is contained in:
2026-05-08 19:12:16 -03:00
parent 1015cf4577
commit f98606dcce
23 changed files with 1060 additions and 11 deletions
+14
View File
@@ -0,0 +1,14 @@
{ pkgs, ... }: {
# Apple T2 machines often need additional Broadcom firmware not shipped in
# linux-firmware. Firmware is stored in this host directory.
hardware.firmware = [
(pkgs.stdenvNoCC.mkDerivation (final: {
name = "t2mbp-brcm-firmware";
src = ./firmware/brcm;
installPhase = ''
mkdir -p "$out/lib/firmware/brcm"
cp -v ${final.src}/* "$out/lib/firmware/brcm"
'';
}))
];
}
+30
View File
@@ -0,0 +1,30 @@
{ ... }: {
# Bootloader and EFI
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot";
boot.loader.systemd-boot.configurationLimit = 5;
# Hibernate support (resume from swap partition).
boot.resumeDevice = "/dev/disk/by-uuid/403c9698-b501-4198-96cf-f27f82f1eb1a";
# Suspend is allowed again: kernel cmdline + out-of-tree apple-bce are in
# `t2linux/_private/boot-tuning.nix` and `t2linux/_private/kernel.nix`. If you need
# to block sleep while debugging: `systemd.sleep.settings.Sleep.AllowSuspend = "no";`
# Power and thermal management.
powerManagement.cpuFreqGovernor = "ondemand";
services.thermald.enable = true;
hardware.sensor.iio.enable = true;
# Pull in linux-firmware (and friends) from nixpkgs.
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
# Enable flakes and the newer CLI.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "25.11";
}