mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-05 01:37:24 +08:00
raspberry-pi/5: add kernel version assertion
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
@@ -24,4 +24,11 @@
|
|||||||
Option "PrimaryGPU" "true"
|
Option "PrimaryGPU" "true"
|
||||||
EndSection
|
EndSection
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1.54");
|
||||||
|
message = "The Raspberry Pi 5 requires a newer kernel version (>=6.1.54). Please upgrade nixpkgs for this system.";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user