!oNSIfazDqEcwhcOjSL:matrix.org

disko

405 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko113 Servers

Load older messages


SenderMessageTime
12 Apr 2026
@matthewcroughan:defenestrate.itmatthewcroughanhttps://github.com/NixOS/nixpkgs/blob/master/nixos/modules/image/repart.nix#L152-L17119:05:26
@matthewcroughan:defenestrate.itmatthewcroughan* I already tried this once and you said no, that others should configure it themselves in extraPostVM19:05:49
@matthewcroughan:defenestrate.itmatthewcroughanLike right now I'm writing a wrapper that lets somebody do it19:10:12
@matthewcroughan:defenestrate.itmatthewcroughan
    disko.imageBuilder.extraPostVM = lib.optionalString cfg.image.embedUboot ''
      ${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot-rockchip.bin of=$out/${config.disko.devices.disk.disk1.imageName} bs=512 seek=64
    '' + lib.optionalString cfg.image.disko.compress ''
      ${pkgs.zstd}/bin/zstd --compress $out/*raw
      rm $out/*raw
    '';
19:10:19
@matthewcroughan:defenestrate.itmatthewcroughanIt ends up looking like this19:10:23
@matthewcroughan:defenestrate.itmatthewcroughanbut I don't like that 19:10:30
@matthewcroughan:defenestrate.itmatthewcroughan instead it'd be nice if I could just set disko.imageBuilder.compression.enable = true 19:11:03
@matthewcroughan:defenestrate.itmatthewcroughanhttps://blog.holms.place/2022/01/22/zfs-on-sd-card-under-linux.html21:41:14
13 Apr 2026
@tanja:catgirl.cloudTanja (she/her) removed their profile picture.14:19:52
@matthewcroughan:defenestrate.itmatthewcroughan error: Unsupported OVMF projectDscPath on armv6l 21:32:34
@matthewcroughan:defenestrate.itmatthewcroughan *

error: Unsupported OVMF projectDscPath on armv6l

21:32:37
@matthewcroughan:defenestrate.itmatthewcroughandisko's image builder doesn't support armv621:32:43
@matthewcroughan:defenestrate.itmatthewcroughanmight be my fault 🧠21:36:43
@matthewcroughan:defenestrate.itmatthewcroughanhttps://github.com/nix-community/disko/pull/643/changes21:36:45
@matthewcroughan:defenestrate.itmatthewcroughanThen after you fix that, you can't use disko anyway since disko needs qemu in order to build images22:02:28
@matthewcroughan:defenestrate.itmatthewcroughan
spandsp-aarch64-linux> checking for ld used by armv6l-unknown-linux-gnueabihf-gcc... armv6l-unknown-linux-gnueabihf-ld
error: Cannot build '/nix/store/qjr624zrczgfj4vy6bpxiygaaf15xq6v-qemu-armv6l-unknown-linux-gnueabihf-10.2.2.drv'.
22:02:30
@matthewcroughan:defenestrate.itmatthewcroughanwhich doesn't work because spandsp doesn't build and work on armv6l22:02:39
@matthewcroughan:defenestrate.itmatthewcroughanlooks like disko is using a fuller qemu than it needs to ? 22:11:28
@matthewcroughan:defenestrate.itmatthewcroughan You can set disko.imageBuilder.qemu, but why does disko default to a qemu that has gtk and opengl support? 22:11:48
@matthewcroughan:defenestrate.itmatthewcroughan Looks like the lib/make-disk-image.nix hardcodes virtio_pci, which won't work on armv6 either 22:15:02
14 Apr 2026
@lukas:landgraf.moeLukas joined the room.01:49:33
16 Apr 2026
@pascal.sthamer:matrix.procyde.onlinePascal Sthamer joined the room.07:05:43
25 Apr 2024
@zraexy:nixos.devDavid Mell (zraexy) joined the room.23:38:25
@zraexy:nixos.devDavid Mell (zraexy) changed their display name from David Mell to David Mell (zraexy).23:51:57
26 Apr 2024
@raj-magesh:matrix.orgRaj

Couple of questions about NixOS live USBs:

I want to partition my 64 GB USB flash drive into two partitions (FAT32 live USB + ext4 storage), so I used the following disko config:

let
  usb = "/dev/disk/by-id/usb-USB_SanDisk_3.2Gen1_0401a943ae4197a38a6f9070194e9ea2b3fb8dbb7997e05ed1b197c0e28946be4b8f000000000000000000001cf4be6800926418a955810751ab6336-0:0";
in {
  disko.devices = {
    disk = {
      live = {
        type = "disk";
        device = usb;
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              device = "${usb}-part1";
              priority = 0;
              size = "8192M";
              content = {
                type = "filesystem";
                format = "vfat";
              };
            };
            storage = {
              device = "${usb}-part2";
              priority = 1;
              size = "100%";
              content = {
                type = "filesystem";
                format = "ext4";
              };
            };
          };
        };
      };
    };
  };
}

I then copied over the files from the (minimal, non-graphical) NixOS live ISO into partition 1, hoping that the instructions on the Arch wiki would generalize to NixOS, but then my live ISO gets stuck with the following error message:

[...]
Timed out waiting for device /dev/root, trying to mount anyway
mounting /dev/root on /iso...
mount: mounting /dev/root on /mnt-root/iso failed: No such file or directory

An error occurred [...]

How can I use my USB flash drive as both a live USB and as a storage device? I found this relevant Discourse link but there was no resolution to the problem there.

I realize this might not be the best place to ask this, but I figured that folks here would have expertise configuring boot partitions correctly.

02:02:16
@raj-magesh:matrix.orgRaj *

Couple of questions about NixOS live USBs:

I want to partition my 64 GB USB flash drive into two partitions (FAT32 live USB + ext4 storage), so I used the following disko config:

let
  usb = "/dev/disk/by-id/usb-USB_SanDisk_3.2Gen1_0401a943ae4197a38a6f9070194e9ea2b3fb8dbb7997e05ed1b197c0e28946be4b8f000000000000000000001cf4be6800926418a955810751ab6336-0:0";
in {
  disko.devices = {
    disk = {
      live = {
        type = "disk";
        device = usb;
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              device = "${usb}-part1";
              priority = 0;
              size = "8192M";
              content = {
                type = "filesystem";
                format = "vfat";
              };
            };
            storage = {
              device = "${usb}-part2";
              priority = 1;
              size = "100%";
              content = {
                type = "filesystem";
                format = "ext4";
              };
            };
          };
        };
      };
    };
  };
}

I then copied over the files from the (minimal, non-graphical) NixOS live ISO into partition 1, hoping that the instructions on the Arch wiki would generalize to NixOS, but then my live ISO gets stuck with the following error message:

[...]
Timed out waiting for device /dev/root, trying to mount anyway
mounting /dev/root on /iso...
mount: mounting /dev/root on /mnt-root/iso failed: No such file or directory

An error occurred [...]

How can I use my USB flash drive as both a live USB and as a storage device? I found this relevant Discourse link but there was no resolution to the problem there.

I realize this might not be the best place to ask this, but I figured that folks here would have expertise configuring boot partitions correctly.

For reference, the NixOS manual says I should dd the ISO to the disk directly: sudo dd if=<path-to-image> of=/dev/sdX bs=4M conv=fsync

02:12:28
@tim92:matrix.orgtimI don't think that this will work since you need to unmount the live USB to format it as storage device07:16:00
@raj-magesh:matrix.orgRaj
In reply to @tim92:matrix.org
I don't think that this will work since you need to unmount the live USB to format it as storage device
Not sure what you mean, exactly. To clarify, I'm not trying to format the USB while it's live; I'm running this from an existing NixOS install.

If the"live USB" bit uses only ~1 GiB, there should be some way to make use of the remaining space, hopefully.
07:57:47
@perchun:matrix.orgPerchun Pak left the room.07:57:54
@lassulus:lassul.uslassulus changed their profile picture.08:25:00

Show newer messages


Back to Room ListRoom Version: 10