diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2023-09-03 07:13:40 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2023-09-03 07:16:52 +0200 |
commit | f6fa02c984f46a7157e72feab59608662d740d3a (patch) | |
tree | 22d46f2fe50aec4129533644d620eae6f426d8a8 /nixos/modules/services | |
parent | d816b5ab44187a2dd84806630ce77a733724f95f (diff) | |
download | nixlib-f6fa02c984f46a7157e72feab59608662d740d3a.tar nixlib-f6fa02c984f46a7157e72feab59608662d740d3a.tar.gz nixlib-f6fa02c984f46a7157e72feab59608662d740d3a.tar.bz2 nixlib-f6fa02c984f46a7157e72feab59608662d740d3a.tar.lz nixlib-f6fa02c984f46a7157e72feab59608662d740d3a.tar.xz nixlib-f6fa02c984f46a7157e72feab59608662d740d3a.tar.zst nixlib-f6fa02c984f46a7157e72feab59608662d740d3a.zip |
openrbg: set default based on what microcode updates are enabled
nixos-generate-config sets either of these, so lets use them
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/hardware/openrgb.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/hardware/openrgb.nix b/nixos/modules/services/hardware/openrgb.nix index 310615ecc539..13b1d07e53b7 100644 --- a/nixos/modules/services/hardware/openrgb.nix +++ b/nixos/modules/services/hardware/openrgb.nix @@ -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."; }; |