From fd9ed4e5e826674131f4887853150d3795dd222f Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 5 Jul 2024 16:25:36 +0200 Subject: refactor(hosts): Also move bluetooth and graphics to separate modules --- modules/system/hardware/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'modules/system/hardware') diff --git a/modules/system/hardware/default.nix b/modules/system/hardware/default.nix index d2d7d146..850416b7 100644 --- a/modules/system/hardware/default.nix +++ b/modules/system/hardware/default.nix @@ -7,21 +7,34 @@ cfg = config.soispha.hardware; in { options.soispha.hardware = { - enable = lib.mkEnableOption "udev rules for devices I use"; + enable = lib.mkEnableOption "the various hardware dependend things (and graphics drivers)"; moonlander = { enableLiveTraining = lib.mkEnableOption "udev rules for live training"; enableFlashing = lib.mkEnableOption "udev rules for firmware flashing"; }; + + cpuType = lib.mkOption { + type = lib.types.enum ["amd" "intel"]; + description = '' + The manuafacturer of the used cpu. + + This is used to enable, for example, the correct microcode updates. + ''; + }; }; config = lib.mkIf cfg.enable { hardware = { + cpu.amd.updateMicrocode = cfg.cpuType == "amd"; + cpu.intel.updateMicrocode = cfg.cpuType == "intel"; + + # This is enabled manually to support older firmware. keyboard.zsa.enable = false; - nitrokey.enable = true; + nitrokey.enable = true; onlykey.enable = false; - opengl = { + graphics = { enable = true; extraPackages = builtins.attrValues { inherit -- cgit 1.4.1