mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 17:46:29 +09:00

also adds @programmerlexi to limine package maintainers Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
35 lines
869 B
Nix
35 lines
869 B
Nix
{ lib, pkgs, ... }:
|
|
{
|
|
name = "secureBoot";
|
|
meta = {
|
|
inherit (pkgs.limine.meta) maintainers;
|
|
};
|
|
|
|
meta.platforms = [
|
|
"aarch64-linux"
|
|
"i686-linux"
|
|
"x86_64-linux"
|
|
];
|
|
nodes.machine =
|
|
{ pkgs, ... }:
|
|
{
|
|
virtualisation.useBootLoader = true;
|
|
virtualisation.useEFIBoot = true;
|
|
virtualisation.useSecureBoot = true;
|
|
virtualisation.efi.OVMF = pkgs.OVMFFull.fd;
|
|
virtualisation.efi.keepVariables = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
boot.loader.limine.enable = true;
|
|
boot.loader.limine.efiSupport = true;
|
|
boot.loader.limine.secureBoot.enable = true;
|
|
boot.loader.limine.secureBoot.createAndEnrollKeys = true;
|
|
boot.loader.timeout = 0;
|
|
};
|
|
|
|
testScript = ''
|
|
machine.start()
|
|
assert "Secure Boot: enabled (user)" in machine.succeed("bootctl status")
|
|
'';
|
|
}
|