1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2025-01-28 19:55:01 +01:00
nixos-hardware/starfive/visionfive/v2/default.nix

40 lines
874 B
Nix

{
config,
lib,
pkgs,
...
}:
{
imports = [
./firmware.nix
];
boot = {
consoleLogLevel = lib.mkDefault 7;
# Switch to default as soon they reach >= 6.11
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
initrd.availableKernelModules = [ "dw_mmc_starfive" ];
# Support booting SD-image from NVME SSD
initrd.kernelModules = [
"clk-starfive-jh7110-aon"
"clk-starfive-jh7110-stg"
"phy-jh7110-pcie"
"pcie-starfive"
"nvme"
];
loader = {
grub.enable = lib.mkDefault false;
generic-extlinux-compatible.enable = lib.mkDefault true;
};
};
assertions = [
{
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.11";
message = "The VisionFive 2 requires at least mainline kernel version 6.11 for minimum hardware support.";
}
];
}