nixos/modules/boot/kernel.nix

15 lines
425 B
Nix
Raw Normal View History

2023-07-14 17:10:53 +08:00
{ 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);
};
}