mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
OVMF: Add test with secure boot enabled
Co-authored-by: Arthur Gautier <arthur.gautier@arista.com>
This commit is contained in:
parent
4673ad7254
commit
9188bb5186
4 changed files with 37 additions and 0 deletions
|
@ -877,9 +877,11 @@ in
|
|||
type = types.package;
|
||||
default = (pkgs.OVMF.override {
|
||||
secureBoot = cfg.useSecureBoot;
|
||||
systemManagementModeRequired = cfg.useSecureBoot;
|
||||
}).fd;
|
||||
defaultText = ''(pkgs.OVMF.override {
|
||||
secureBoot = cfg.useSecureBoot;
|
||||
systemManagementModeRequired = cfg.useSecureBoot;
|
||||
}).fd'';
|
||||
description =
|
||||
lib.mdDoc "OVMF firmware package, defaults to OVMF configured with secure boot if needed.";
|
||||
|
@ -1183,6 +1185,10 @@ in
|
|||
"-tpmdev emulator,id=tpm_dev_0,chardev=chrtpm"
|
||||
"-device ${cfg.tpm.deviceModel},tpmdev=tpm_dev_0"
|
||||
])
|
||||
(mkIf (cfg.efi.OVMF.systemManagementModeRequired or false) [
|
||||
"-machine" "q35,smm=on"
|
||||
"-global" "driver=cfi.pflash01,property=secure,value=on"
|
||||
])
|
||||
];
|
||||
|
||||
virtualisation.qemu.drives = mkMerge [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue