openrbg: set default based on what microcode updates are enabled

nixos-generate-config sets either of these, so lets use them
This commit is contained in:
Jörg Thalheim 2023-09-03 07:13:40 +02:00
parent d816b5ab44
commit f6fa02c984

View file

@ -17,7 +17,14 @@ in {
motherboard = mkOption {
type = types.nullOr (types.enum [ "amd" "intel" ]);
default = null;
default = if config.hardware.cpu.intel.updateMicrocode then "intel"
else if config.hardware.cpu.amd.updateMicrocode then "amd"
else null;
defaultText = literalMD ''
if config.hardware.cpu.intel.updateMicrocode then "intel"
else if config.hardware.cpu.amd.updateMicrocode then "amd"
else null;
'';
description = lib.mdDoc "CPU family of motherboard. Allows for addition motherboard i2c support.";
};