make-disk-image: add binfmt emulation

This commit is contained in:
Sávio
2025-01-16 18:32:51 -03:00
committed by Jörg Thalheim
parent 85942f35d3
commit 6438340415
4 changed files with 191 additions and 1 deletions

View File

@@ -14,6 +14,15 @@ in
options.disko = {
imageBuilder = {
enableBinfmt = lib.mkOption {
type = lib.types.bool;
description = ''
enable emulation of foreign architecture binaries in the builder.
Makes it possible to build disk images for a foreign architecture in a VM with native performance.
Required for the bootloader installation step, which chroots into the target environment.
'';
default = false;
};
qemu = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = ''
@@ -222,6 +231,7 @@ in
}
];
_module.args.imagePkgs = pkgs;
_module.args.diskoLib = import ./lib {
inherit lib;
rootMountPoint = config.disko.rootMountPoint;