-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support host/guest pkgs distinction for make-disk-image #856
Comments
I'm not sure I understand the issue 100%, but wouldn't it be enough to set |
I think just It starts that the script isn't executable on the host system as writeCheckedBash uses To be honest I haven't worked with nixpkgs cross-compilation enough. |
I think this may be related to this issue NixOS/nixpkgs#73470 |
So seems this really isn't possible without reusing or re-implementing what NixOS |
For anyone interested: Using this branch (has a dependant nixpkgs PR) I can successfully build Linux disk images on Darwin, quite fast as well. https://github.com/felixscheinost/disko/tree/runInLinuxVM-darwin. I'd keep this issue open for a while if that's ok? I'm expecting that the nixpkgs PR of mine won't be accepted as is but maybe the necessary changes can be made upstream sometime. |
If I am not missing something it is currently not possible to use different
system
for QEMU creating the disk image vs thepkgs
used in the image, right?This means I really need to be on the same architecture as otherwise double virtualisation happens which is really slow.
When trying to cross-build e.g. aarch64-linux on x86_64-linux, the QEMU is aarch64-linux.
When using binfmt to emulate that, QEMU itself is already running emulated, then emulating another machine so double emulation, right?
NixOS last year or so introduced the ability to override the pkgs used for QEMU using
virtualisation.host.pkgs
. This way I can even run a x86_64-linux on aarch64-darwin using acceptable speed!Would it be possible to add something like that?
I see that there's
disko.imageBuilder.pkgs
but I think that isn't what I want as it is used for both QEMU and e.g.dependencies
used inside the VM.Would you be open to a PR trying to tackle that?
Maybe would it even make sense to instead of nixpkgs'
runInLinuxVM
try to use NixOS's virtualisation infrastructure which already supports this? Or was something like that already attempted?The text was updated successfully, but these errors were encountered: