refactor(nixosModules/hardware): move cpu config intondefault

This commit is contained in:
Mohammad Rafiq 2025-06-10 22:22:38 +08:00
parent e688519d02
commit 97746093ed
No known key found for this signature in database
2 changed files with 19 additions and 23 deletions

View file

@ -1,13 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
(lib.mkIf (config.hardware.platform == "amd") {
hardware.cpu.amd.updateMicrocode = true;
boot.kernelModules = [ "kvm-amd" ];
})
(lib.mkIf (config.hardware.platform == "intel") {
hardware.cpu.intel.updateMicrocode = true;
boot.kernelModules = [ "kvm-intel" ];
})
];
}

View file

@ -1,10 +1,9 @@
{ lib, ... }:
{ lib, config, ... }:
{
imports = [
./btrfs.nix
./nvidia.nix
./audio.nix
./cpu.nix
./networking.nix
];
@ -18,12 +17,22 @@
platform = lib.pantheon.mkStrOption;
};
config = {
services.fwupd.enable = true;
hardware.bluetooth = {
enable = true;
settings.General.Experimental = true;
};
hardware.xone.enable = true;
};
config = lib.mkMerge [
{
services.fwupd.enable = true;
hardware.bluetooth = {
enable = true;
settings.General.Experimental = true;
};
hardware.xone.enable = true;
}
(lib.mkIf (config.hardware.platform == "amd") {
hardware.cpu.amd.updateMicrocode = true;
boot.kernelModules = [ "kvm-amd" ];
})
(lib.mkIf (config.hardware.platform == "intel") {
hardware.cpu.intel.updateMicrocode = true;
boot.kernelModules = [ "kvm-intel" ];
})
];
}