Unverified Commit e53e1093 authored by John Titor's avatar John Titor
Browse files

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.
parent b5d4fb5c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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")
  '';
}