intel.nix: add option to enable intel config
This commit is contained in:
parent
53aaa26fa1
commit
0975fc9a95
1 changed files with 15 additions and 9 deletions
|
@ -4,16 +4,22 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkDefault;
|
||||
inherit (lib.modules) mkDefault mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.hardware.intel;
|
||||
in {
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
||||
graphics.extraPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
intel-vaapi-driver
|
||||
intel-media-driver
|
||||
;
|
||||
options.modules.system.hardware.intel.enable = mkEnableOption "Intel Hardware";
|
||||
config = mkIf cfg.enable {
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
||||
graphics.extraPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
intel-vaapi-driver
|
||||
intel-media-driver
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue