Skip to content

Commit

Permalink
openrbg: set default based on what microcode updates are enabled
Browse files Browse the repository at this point in the history
nixos-generate-config sets either of these, so lets use them
  • Loading branch information
Mic92 committed Sep 3, 2023
1 parent d816b5a commit f6fa02c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nixos/modules/services/hardware/openrgb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
};

Expand Down

0 comments on commit f6fa02c

Please sign in to comment.