From b2f60c8bd00c9225d1e97dbe7ea9314379174399 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Wed, 1 May 2024 15:40:27 -0400 Subject: [PATCH] raspberry-pi/5: add kernel version assertion --- raspberry-pi/5/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/raspberry-pi/5/default.nix b/raspberry-pi/5/default.nix index 038b146..1fbd757 100644 --- a/raspberry-pi/5/default.nix +++ b/raspberry-pi/5/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, config, ... }: { nixpkgs.overlays = [ @@ -24,4 +24,11 @@ Option "PrimaryGPU" "true" 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."; + } + ]; }