From 2f3707f6a7af4ee5f76278b92d5b5f9615fdcb60 Mon Sep 17 00:00:00 2001 From: buffet Date: Wed, 7 Feb 2024 15:36:30 +0100 Subject: [PATCH] feat: use assertions to ensure kernel doesn't hit 6.7 --- hosts/alice/system.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/alice/system.nix b/hosts/alice/system.nix index 4d99d5b..ffaabb3 100644 --- a/hosts/alice/system.nix +++ b/hosts/alice/system.nix @@ -16,7 +16,7 @@ boot = { supportedFilesystems = ["bcachefs"]; - kernelPackages = pkgs.linuxPackages_6_7; # TODO: remove when default kernel hits 6.7 + kernelPackages = pkgs.linuxPackages_6_7; loader = { systemd-boot.enable = true; @@ -50,4 +50,11 @@ experimental-features = nix-command flakes ''; }; + + assertions = [ + { + assertion = -1 == builtins.compareVersions pkgs.linuxPackages.kernel.version "6.7.3"; + message = "default kernel has hit 6.7, change linuxPackages to default"; + } + ]; }