Skip to content

Commit

Permalink
docs/disko-images: fix codeblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Feb 17, 2025
1 parent dc4687a commit af4a580
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/disko-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,29 @@ In the this example we create a flake containing a nixos configuration for

- For custom image name output, define the image name in your Disko configuration:

```console
```nix
disko.devices.disk.<drive>.imageName = "nixos-x86_64-linux-generic-btrfs"; # Set your preferred name
```

The image scirpt will produce `nixos-x86_64-linux-generic-btrfs.raw` instead of `<drive>.raw`.

- For virtual drive use, define the image size in your Disko configuration:

```console
```nix
disko.devices.disk.<drive>.imageSize = "32G"; # Set your preferred size
```

- To build an image for another target platform, enable binfmt emulation support.

```console
```nix
disko.imageBuilder.enableBinfmt = true;
```

This requires a working binfmt setup for your target platform on your build machine. Setup instructions are available for [NixOS](https://wiki.nixos.org/wiki/NixOS_on_ARM/Building_Images#Compiling_through_binfmt_QEMU) and other distros ([Arch Linux](https://wiki.archlinux.org/title/QEMU#Chrooting_into_arm/arm64_environment_from_x86_64), [Debian](https://wiki.debian.org/QemuUserEmulation)).

The relevant configuration for building `aarch64-linux` images on a `x86_64-linux` host looks like this:

```console
```nix
disko = {
imageBuilder = {
enableBinfmt = true;
Expand Down

0 comments on commit af4a580

Please sign in to comment.