Skip to content

Commit 4fc5ae8

Browse files
Mic92mergify[bot]
authored andcommitted
README: describe how emulate / run different architectures
1 parent 8a01034 commit 4fc5ae8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,20 @@ Or for a version closer to `nixos-shell`:
282282
nix run .#nixosConfigurations.<yourmachine>.config.system.build.nixos-shell
283283
```
284284

285+
## Running different architectures / operating systems i.e. Linux on MacOS
286+
287+
It's possible to specify a different architecture using `--guest-system`.
288+
This requires your host system to have a either a remote builder
289+
(i.e. [darwin-builder](https://github.com/NixOS/nixpkgs/blob/master/doc/packages/darwin-builder.section.md) on macOS)
290+
or beeing able to run builds in emulation
291+
for the guest system (`boot.binfmt.emulatedSystems` on NixOS.).
292+
293+
Here is an example for macOS (arm) that will run an aarch64-linux vm:
294+
295+
```
296+
$ nixos-shell --guest-system aarch64-linux examples/vm.nix
297+
```
298+
285299
## More configuration
286300

287301
Have a look at the [virtualisation] options NixOS provides.

0 commit comments

Comments
 (0)