mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-24 04:28:45 +08:00
15 lines
425 B
Nix
15 lines
425 B
Nix
|
{ pkgs, ... }@inputs:
|
||
|
{
|
||
|
options.nixos.kernel = let inherit (inputs.lib) mkOption types; in
|
||
|
{
|
||
|
cpu = mkOption { type = types.listOf (types.enum [ "intel" "amd" ]); default = []; };
|
||
|
};
|
||
|
config =
|
||
|
{
|
||
|
boot.kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest;
|
||
|
hardware.cpu = builtins.listToAttrs (builtins.map
|
||
|
(name: { inherit name; value = { updateMicrocode = true; }; })
|
||
|
inputs.config.nixos.kernel.cpu);
|
||
|
};
|
||
|
}
|