From e53e10938c73da21f3fc763485aee70ea56f8e3b Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Wed, 22 Oct 2025 19:50:35 +0530 Subject: [PATCH] nixosTests.limine.secureBoot: fix secure boot check An easier way to check if secureBoot is enabled is by running mokutil --sb-state We have to do this way now because on systemd v258 `bootctl status` returns non 0 value if systemd-boot is not properly installed, which is to be expected when using Limine. --- nixos/tests/limine/secure-boot.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/tests/limine/secure-boot.nix b/nixos/tests/limine/secure-boot.nix index 52508f7eb385..9811734db5cb 100644 --- a/nixos/tests/limine/secure-boot.nix +++ b/nixos/tests/limine/secure-boot.nix @@ -26,10 +26,12 @@ boot.loader.limine.secureBoot.enable = true; boot.loader.limine.secureBoot.createAndEnrollKeys = true; boot.loader.timeout = 0; + + environment.systemPackages = [ pkgs.mokutil ]; }; testScript = '' machine.start() - assert "Secure Boot: enabled (user)" in machine.succeed("bootctl status") + assert "SecureBoot enabled" in machine.succeed("mokutil --sb-state") ''; }