make-disk-image: add binfmt emulation

This commit is contained in:
Sávio authored and Jörg Thalheim committed 2025-02-14 10:39:29 +00:00
1 parent 85942f35d3
commit 6438340415
4 files changed
+191 -1

No files matched your search

+10
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;