1
0
Fork 0

home-manager: OVMF/AAVMF setup for QEMU/libvirtd

This commit is contained in:
Pratham Patel 2024-02-17 14:44:06 +05:30
parent 855dfca4dd
commit 3baf05ab31
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 21 additions and 0 deletions

View File

@ -1,5 +1,17 @@
{ config, lib, pkgs, ... }:
let
OVMFPkg = (pkgs.OVMF.override{
secureBoot = true;
tpmSupport = true;
}).fd;
OVMFBinName = if pkgs.stdenv.isAarch64 then "AAVMF"
else (
if pkgs.stdenv.isx86_64 then "OVMF"
else ""
);
in
{
programs.home-manager.enable = true;
@ -93,6 +105,15 @@
};
};
xdg.configFile = {
"libvirt/qemu.conf" = {
enable = true;
text = ''
nvram = [ "${OVMFPkg}/FV/${OVMFBinName}_CODE.fd:${OVMFPkg}/FV/${OVMFBinName}_VARS.fd" ]
'';
};
};
nix = {
package = pkgs.nix;
checkConfig = true;