Update FredOS-Macbook.nix

This commit is contained in:
ediblerope 2025-12-19 11:41:19 +00:00 committed by GitHub
parent dda9fe291f
commit 2a54416d60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,42 +1,36 @@
# hosts/FredOS-Macbook.nix
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
nixpkgs.config.permittedInsecurePackages = [ # Use mkMerge to allow the insecure package rule to sit alongside the mkIf block
(pkgs.lib.getName config.boot.kernelPackages.broadcom_sta) config = lib.mkMerge [
]; # 1. This part always applies if this file is imported
{
nixpkgs.config.permittedInsecurePackages = [
(pkgs.lib.getName config.boot.kernelPackages.broadcom_sta)
];
}
config = lib.mkIf (config.networking.hostName == "FredOS-Macbook") { # 2. This part only applies if the hostname matches
environment.systemPackages = with pkgs; [ (lib.mkIf (config.networking.hostName == "FredOS-Macbook") {
# Package names here environment.systemPackages = with pkgs; [
tlp
]; ];
# Enable tlp service services.tlp.enable = true;
services.tlp.enable = true; services.power-profiles-daemon.enable = false;
services.power-profiles-daemon.enable = false;
boot = {
# Bootloader loader = {
boot = { systemd-boot.enable = true;
loader = { efi.canTouchEfiVariables = true;
systemd-boot.enable = true; };
efi.canTouchEfiVariables = true;
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
blacklistedKernelModules = [ "b43" "bcma" "ssb" ];
}; };
# Enable Broadcom WL for Macbook hardware.enableRedistributableFirmware = true;
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; })
];
blacklistedKernelModules = [
"b43"
"bcma"
"ssb"
];
};
hardware.enableRedistributableFirmware = true;
# Put nixpkgs config INSIDE the mkIf
#nixpkgs.config.permittedInsecurePackages = [
#pkgs.lib.getName config.boot.kernelPackages.broadcom_sta
#];
};
} }