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
cfg = config.x-banananetwork.hwCommon;
cpu = config.hardware.cpu;
in
{
options = {
x-banananetwork.hwCommon = {
enable = lib.mkEnableOption ''
settings common to all bare hardware-based hosts
'';
hardware.cpu = {
cpu = lib.mkOption {
type = lib.mkOption {
description = ''
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
(cfg.cpu == "amd")
(cpu.type == "amd")
{ amd.updateMicrocode = true; }
)
(
lib.mkIf
(cfg.cpu == "intel")
(cpu.type == "intel")
{ intel.updateMicrocode = true; }
)

Loading…
Cancel
Save