diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2021-05-18 17:27:37 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2021-05-18 17:27:37 -0300 |
commit | 4e3060d488cca26d82fff2cdd144cb2ee03e1131 (patch) | |
tree | 20e25d2aaf9f07b6cfffa9529c5ca745383abd4e /nixos/modules/virtualisation | |
parent | 73b982e62194a5d85827d87b0851aee06932979f (diff) | |
download | nixpkgs-4e3060d488cca26d82fff2cdd144cb2ee03e1131.tar nixpkgs-4e3060d488cca26d82fff2cdd144cb2ee03e1131.tar.gz nixpkgs-4e3060d488cca26d82fff2cdd144cb2ee03e1131.tar.bz2 nixpkgs-4e3060d488cca26d82fff2cdd144cb2ee03e1131.tar.lz nixpkgs-4e3060d488cca26d82fff2cdd144cb2ee03e1131.tar.xz nixpkgs-4e3060d488cca26d82fff2cdd144cb2ee03e1131.tar.zst nixpkgs-4e3060d488cca26d82fff2cdd144cb2ee03e1131.zip |
libvirtd: fix ovmf for aarch64
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/libvirtd.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index f43c44f5dca..d12169787c5 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -11,9 +11,10 @@ let auth_unix_rw = "polkit" ${cfg.extraConfig} ''; + ovmfFilePrefix = if pkgs.stdenv.isAarch64 then "AAVMF" else "OVMF"; qemuConfigFile = pkgs.writeText "qemu.conf" '' ${optionalString cfg.qemuOvmf '' - nvram = ["/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd"] + nvram = [ "/run/libvirt/nix-ovmf/${ovmfFilePrefix}_CODE.fd:/run/libvirt/nix-ovmf/${ovmfFilePrefix}_VARS.fd" ] ''} ${optionalString (!cfg.qemuRunAsRoot) '' user = "qemu-libvirtd" @@ -206,8 +207,8 @@ in { done ${optionalString cfg.qemuOvmf '' - ln -s --force ${pkgs.OVMF.fd}/FV/OVMF_CODE.fd /run/${dirName}/nix-ovmf/ - ln -s --force ${pkgs.OVMF.fd}/FV/OVMF_VARS.fd /run/${dirName}/nix-ovmf/ + ln -s --force ${pkgs.OVMF.fd}/FV/${ovmfFilePrefix}_CODE.fd /run/${dirName}/nix-ovmf/ + ln -s --force ${pkgs.OVMF.fd}/FV/${ovmfFilePrefix}_VARS.fd /run/${dirName}/nix-ovmf/ ''} ''; |