NixOS virtual machines on macOS: Difference between revisions
No edit summary |
add section to enhance remote builder on darwin systems with x86_64 capability |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 22: | Line 22: | ||
that the Linux builder is actually such a virtual machine. | that the Linux builder is actually such a virtual machine. | ||
Point 4 is similar to point 3, but since the tests are | Point 4 is similar to point 3, but since the tests are '''built''' using virtual | ||
machines, it means that these virtual machines are running inside the Linux | machines, it means that these virtual machines are running inside the Linux | ||
builder. This is not a problem if our environment supports nested | builder. This is not a problem if our environment supports nested | ||
| Line 208: | Line 208: | ||
Note: Notice how further configuring the Linux builder uses the running Linux | Note: Notice how further configuring the Linux builder uses the running Linux | ||
builder to build the new one. | builder to build the new one. | ||
== <code>linux-builder</code>, with <code>x86_64-linux</code> emulation == | |||
Building upon previous example, the remote builder can be enhanced to build x86_64 packages without creating a second VM or builder<ref>https://github.com/nix-darwin/nix-darwin/issues/1192#issuecomment-2619629531</ref>:<syntaxhighlight lang="nix"> | |||
nix.linux-builder = { | |||
# ... | |||
systems = [ "x86_64-linux" "aarch64-linux" ]; | |||
config.boot.binfmt.emulatedSystems = [ "x86_64-linux" ]; | |||
}; | |||
</syntaxhighlight> | |||
== <code>direnv</code> == | == <code>direnv</code> == | ||
| Line 287: | Line 296: | ||
The original machine had also Screen Sharing enabled. | The original machine had also Screen Sharing enabled. | ||
== | == Further reading == | ||
* | * [https://nixcademy.com/posts/macos-linux-builder/ Build and Deploy Linux Systems from macOS], Nixcademy | ||
* [https://nixcademy.com/posts/running-nixos-integration-tests-on-macos/ Run NixOS Integration Tests on macOS], Nixcademy | |||
[[Category:macOS]] | [[Category:macOS]] | ||
[[Category:nix-darwin]] | [[Category:nix-darwin]] | ||
[[Category:Tutorial]] | [[Category:Tutorial]] | ||