2025-12-02 21:23:06 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2025-12-19 11:41:19 +00:00
|
|
|
|
2025-12-02 21:23:06 +00:00
|
|
|
{
|
2025-12-19 11:41:19 +00:00
|
|
|
# Use mkMerge to allow the insecure package rule to sit alongside the mkIf block
|
|
|
|
|
config = lib.mkMerge [
|
|
|
|
|
# 1. This part always applies if this file is imported
|
|
|
|
|
{
|
|
|
|
|
nixpkgs.config.permittedInsecurePackages = [
|
|
|
|
|
(pkgs.lib.getName config.boot.kernelPackages.broadcom_sta)
|
|
|
|
|
];
|
|
|
|
|
}
|
2025-12-19 11:39:52 +00:00
|
|
|
|
2025-12-19 11:41:19 +00:00
|
|
|
# 2. This part only applies if the hostname matches
|
|
|
|
|
(lib.mkIf (config.networking.hostName == "FredOS-Macbook") {
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
tlp
|
|
|
|
|
];
|
2025-12-19 11:34:34 +00:00
|
|
|
|
2025-12-19 11:41:19 +00:00
|
|
|
services.tlp.enable = true;
|
|
|
|
|
services.power-profiles-daemon.enable = false;
|
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
loader = {
|
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
|
|
|
|
|
|
|
|
|
|
blacklistedKernelModules = [ "b43" "bcma" "ssb" ];
|
2025-12-04 18:10:52 +00:00
|
|
|
};
|
|
|
|
|
|
2025-12-19 11:41:19 +00:00
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
})
|
|
|
|
|
];
|
2025-12-02 21:23:06 +00:00
|
|
|
}
|