nixos/modules/boot/kernel.nix
2023-07-14 21:30:30 +08:00

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);
};
}