intel.nix: add option to enable intel config

This commit is contained in:
Charlie Root 2025-04-09 20:54:42 +02:00
commit 0975fc9a95

View file

@ -4,8 +4,13 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib.modules) mkDefault; inherit (lib.modules) mkDefault mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.hardware.intel;
in { in {
options.modules.system.hardware.intel.enable = mkEnableOption "Intel Hardware";
config = mkIf cfg.enable {
hardware = { hardware = {
cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
graphics.extraPackages = builtins.attrValues { graphics.extraPackages = builtins.attrValues {
@ -16,4 +21,5 @@ in {
; ;
}; };
}; };
};
} }