mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-04 14:21:02 +03:00
Merge pull request #300060 from adamcstephens/incus/fix-ovmf
nixos/incus: fix OVMF path for existing VMs
This commit is contained in:
commit
33ad5978bc
@ -60,8 +60,26 @@ let
|
||||
}'';
|
||||
|
||||
# https://github.com/lxc/incus/blob/cff35a29ee3d7a2af1f937cbb6cf23776941854b/internal/server/instance/drivers/driver_qemu.go#L123
|
||||
OVMF2MB = pkgs.OVMF.override {
|
||||
secureBoot = true;
|
||||
fdSize2MB = true;
|
||||
};
|
||||
ovmf-prefix = if pkgs.stdenv.hostPlatform.isAarch64 then "AAVMF" else "OVMF";
|
||||
ovmf = pkgs.linkFarm "incus-ovmf" [
|
||||
# 2MB must remain the default or existing VMs will fail to boot. New VMs will prefer 4MB
|
||||
{
|
||||
name = "OVMF_CODE.fd";
|
||||
path = "${OVMF2MB.fd}/FV/${ovmf-prefix}_CODE.fd";
|
||||
}
|
||||
{
|
||||
name = "OVMF_VARS.fd";
|
||||
path = "${OVMF2MB.fd}/FV/${ovmf-prefix}_VARS.fd";
|
||||
}
|
||||
{
|
||||
name = "OVMF_VARS.ms.fd";
|
||||
path = "${OVMF2MB.fd}/FV/${ovmf-prefix}_VARS.fd";
|
||||
}
|
||||
|
||||
{
|
||||
name = "OVMF_CODE.4MB.fd";
|
||||
path = "${pkgs.OVMFFull.fd}/FV/${ovmf-prefix}_CODE.fd";
|
||||
|
Loading…
Reference in New Issue
Block a user