nixos/modules/kernel/default.nix

19 lines
491 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 =
{
2023-07-15 22:12:29 +08:00
boot =
{
kernelParams = [ "delayacct" "acpi_osi=Linux" ];
kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest;
};
2023-07-14 17:10:53 +08:00
hardware.cpu = builtins.listToAttrs (builtins.map
(name: { inherit name; value = { updateMicrocode = true; }; })
inputs.config.nixos.kernel.cpu);
};
}