2026-03-28 12:36:10 +00:00
|
|
|
{ config, lib, pkgs, modulesPath, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
2026-03-28 12:37:43 +00:00
|
|
|
imports = [
|
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
|
];
|
2026-03-28 12:36:10 +00:00
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
2026-07-08 17:13:51 +01:00
|
|
|
# i915 in initrd = early KMS, so plymouth can draw from the first second
|
|
|
|
|
boot.initrd.kernelModules = [ "i915" ];
|
2026-03-28 12:36:10 +00:00
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
2026-04-01 21:14:16 +01:00
|
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
|
|
|
|
|
boot.blacklistedKernelModules = [ "b43" "bcma" "ssb" ];
|
|
|
|
|
boot.kernelParams = [ "acpi_osi=" ];
|
|
|
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2026-03-28 12:36:10 +00:00
|
|
|
|
2026-03-28 12:37:43 +00:00
|
|
|
fileSystems."/" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/e295ac26-bf7e-4b93-bc97-74c3c01de0e3";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
2026-03-28 12:36:10 +00:00
|
|
|
|
2026-03-28 12:37:43 +00:00
|
|
|
fileSystems."/boot" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/F698-F2B7";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
options = [ "fmask=0077" "dmask=0077" ];
|
|
|
|
|
};
|
2026-03-28 12:36:10 +00:00
|
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
2026-04-08 09:27:34 +01:00
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2026-03-28 12:36:10 +00:00
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
2026-03-28 12:37:43 +00:00
|
|
|
networking.hostName = "FredOS-Macbook";
|
2026-04-01 21:14:16 +01:00
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
hardware.facetimehd.enable = true;
|
|
|
|
|
|
2026-07-24 15:52:54 +01:00
|
|
|
# VA-API hardware video decode. This is a Haswell-ULT GPU (gen7.5) → i965;
|
|
|
|
|
# iHD is gen8+ only and can't init here, so pin the name to skip its probe.
|
|
|
|
|
hardware.graphics.extraPackages = [ pkgs.intel-vaapi-driver ];
|
|
|
|
|
environment.sessionVariables.LIBVA_DRIVER_NAME = "i965";
|
2026-07-24 15:44:14 +01:00
|
|
|
|
2026-07-25 08:45:07 +01:00
|
|
|
# Legacy DRM iface: cursor plane moves via immediate ioctl instead of
|
|
|
|
|
# vblank-batched atomic commits — cursor latency drops below the 60Hz
|
|
|
|
|
# frame floor. Revert if output glitches (legacy path is less tested).
|
|
|
|
|
environment.sessionVariables.AQ_NO_ATOMIC = "1";
|
|
|
|
|
|
2026-06-30 10:42:08 +01:00
|
|
|
# Pin to the 6.12 LTS kernel: the out-of-tree broadcom_sta (Wi-Fi) and
|
|
|
|
|
# facetimehd (iSight) modules don't build against linuxPackages_latest
|
|
|
|
|
# (7.x) — broadcom-sta's wl_cfg80211 ops no longer match the cfg80211 API.
|
|
|
|
|
# 6.12 LTS is the newest kernel both modules compile against. Overrides
|
|
|
|
|
# common.nix's linuxPackages_latest.
|
|
|
|
|
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_12;
|
|
|
|
|
|
2026-04-19 11:18:58 +00:00
|
|
|
# wait_prepare/wait_finish were removed from struct vb2_ops in Linux 6.8
|
|
|
|
|
nixpkgs.overlays = [
|
2026-07-25 09:10:36 +01:00
|
|
|
# Legacy DRM iface (AQ_NO_ATOMIC) cursor fixes, see patch:
|
|
|
|
|
# 1. moveCursor only scheduled a frame — cursor still waited for vblank.
|
|
|
|
|
# Issue the immediate drmModeMoveCursor ioctl like wlroots did.
|
|
|
|
|
# 2. Commits without cursor flags nulled the cursor plane → cursor
|
|
|
|
|
# vanished while idle. Only null when actually hidden.
|
|
|
|
|
# Both present upstream as of aquamarine 0.11.0 / main (July 2026).
|
2026-07-25 08:54:10 +01:00
|
|
|
(final: prev: {
|
|
|
|
|
aquamarine = prev.aquamarine.overrideAttrs (old: {
|
2026-07-25 09:10:36 +01:00
|
|
|
patches = (old.patches or [ ]) ++ [ ../../patches/aquamarine-legacy-cursor.patch ];
|
2026-07-25 08:54:10 +01:00
|
|
|
});
|
|
|
|
|
})
|
2026-04-19 11:18:58 +00:00
|
|
|
(final: prev: {
|
2026-06-30 10:42:08 +01:00
|
|
|
linuxPackages_6_12 = prev.linuxPackages_6_12.extend (lpFinal: lpPrev: {
|
2026-04-19 11:18:58 +00:00
|
|
|
facetimehd = lpPrev.facetimehd.overrideAttrs (old: {
|
|
|
|
|
postPatch = (old.postPatch or "") + ''
|
|
|
|
|
sed -i '/\.wait_prepare[[:space:]]*=.*vb2_ops_wait_prepare/d' fthd_v4l2.c
|
|
|
|
|
sed -i '/\.wait_finish[[:space:]]*=.*vb2_ops_wait_finish/d' fthd_v4l2.c
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2026-06-30 20:00:32 +01:00
|
|
|
# allowInsecurePredicate (broadcom-sta + pnpm) lives in common.nix now.
|
2026-04-01 21:14:16 +01:00
|
|
|
|
|
|
|
|
hardware.bluetooth = {
|
|
|
|
|
enable = true;
|
|
|
|
|
powerOnBoot = true;
|
|
|
|
|
settings = {
|
|
|
|
|
General = {
|
|
|
|
|
Enable = "Source,Sink,Media,Socket";
|
|
|
|
|
Experimental = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2026-03-28 12:37:43 +00:00
|
|
|
|
|
|
|
|
system.stateVersion = "25.11";
|
2026-04-01 21:14:16 +01:00
|
|
|
}
|