nixos-modules/hwCommon: rename x-banananetwork.hwCommon.cpu -> hardware.cpu.type

secrix-issue25
Felix Stupp 3 months ago
parent da9b9aa157
commit 29e0b383ab
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -7,19 +7,17 @@
}: }:
let let
cfg = config.x-banananetwork.hwCommon; cfg = config.x-banananetwork.hwCommon;
cpu = config.hardware.cpu;
in in
{ {
options = { options = {
x-banananetwork.hwCommon = {
enable = lib.mkEnableOption '' hardware.cpu = {
settings common to all bare hardware-based hosts
'';
cpu = lib.mkOption { type = lib.mkOption {
description = '' description = ''
Configures the CPU type to expect this configuration to run on Configures the CPU type to expect this configuration to run on
''; '';
@ -29,6 +27,16 @@ in
}; };
x-banananetwork.hwCommon = {
enable = lib.mkEnableOption ''
settings common to all bare hardware-based hosts
'';
};
}; };
@ -41,13 +49,13 @@ in
( (
lib.mkIf lib.mkIf
(cfg.cpu == "amd") (cpu.type == "amd")
{ amd.updateMicrocode = true; } { amd.updateMicrocode = true; }
) )
( (
lib.mkIf lib.mkIf
(cfg.cpu == "intel") (cpu.type == "intel")
{ intel.updateMicrocode = true; } { intel.updateMicrocode = true; }
) )

Loading…
Cancel
Save