nixos/hosts/FredOS-Macbook.nix

71 lines
1.7 KiB
Nix
Raw Normal View History

2025-12-02 21:23:06 +00:00
{ config, pkgs, lib, ... }:
2026-01-05 10:26:20 +00:00
2025-12-02 21:23:06 +00:00
{
2026-01-05 10:26:20 +00:00
config = lib.mkMerge [
{
nixpkgs.config.allowInsecurePredicate = pkg:
(lib.hasPrefix "broadcom-sta" (lib.getName pkg));
}
(lib.mkIf (config.networking.hostName == "FredOS-Macbook") {
# ... all your other settings (tlp, boot, firmware) ...
2026-01-10 12:36:28 +00:00
environment.systemPackages = with pkgs; [
tlp
vesktop
];
2026-01-05 10:26:20 +00:00
services.tlp.enable = false;
services.power-profiles-daemon.enable = true;
hardware.facetimehd.enable = true;
2026-01-05 10:19:12 +00:00
2026-01-05 10:26:20 +00:00
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
blacklistedKernelModules = [ "b43" "bcma" "ssb" ];
2026-01-16 14:55:20 +00:00
kernelParams = [ "acpi_osi=" ];
2026-01-05 10:26:20 +00:00
};
hardware.enableRedistributableFirmware = true;
2026-01-16 14:55:20 +00:00
services.xserver.deviceSection = lib.mkDefault ''
Option "TearFree" "true"
'';
2026-01-05 10:26:20 +00:00
# Enable Bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Experimental = true;
2025-12-30 14:52:32 +00:00
};
};
2026-01-05 10:26:20 +00:00
};
# PipeWire with Bluetooth support
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
2025-12-30 14:52:32 +00:00
2026-01-05 10:26:20 +00:00
# Add Bluetooth codec config
wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'')
];
2025-12-30 14:52:32 +00:00
};
2026-01-05 10:26:20 +00:00
})
];
2025-12-02 21:23:06 +00:00
}