lol

openrbg: set default based on what microcode updates are enabled

nixos-generate-config sets either of these, so lets use them

+8 -1
+8 -1
nixos/modules/services/hardware/openrgb.nix
··· 17 17 18 18 motherboard = mkOption { 19 19 type = types.nullOr (types.enum [ "amd" "intel" ]); 20 - default = null; 20 + default = if config.hardware.cpu.intel.updateMicrocode then "intel" 21 + else if config.hardware.cpu.amd.updateMicrocode then "amd" 22 + else null; 23 + defaultText = literalMD '' 24 + if config.hardware.cpu.intel.updateMicrocode then "intel" 25 + else if config.hardware.cpu.amd.updateMicrocode then "amd" 26 + else null; 27 + ''; 21 28 description = lib.mdDoc "CPU family of motherboard. Allows for addition motherboard i2c support."; 22 29 }; 23 30