!oNSIfazDqEcwhcOjSL:matrix.org

disko

390 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko103 Servers

Load older messages


SenderMessageTime
11 Apr 2026
@matthewcroughan:defenestrate.itmatthewcroughanyou can fined the same here from 2024 too22:14:57
@matthewcroughan:defenestrate.itmatthewcroughannot sure where to find the defaults tbh22:15:03
@matthewcroughan:defenestrate.itmatthewcroughanbetter to be explicit and not beholden to defaults though, no?22:15:17
12 Apr 2026
@pandapip1:matrix.orgpandapip1

I've had this in my config for a while

fileSystems."/data".options = [ "nofail" ]; # TODO find out why we need this!
  # Notably, https://github.com/nix-community/disko/blob/3a9450b26e69dcb6f8de6e2b07b3fc1c288d85f5/tests/zfs.nix#L12 also needs this
  disko.devices = {
    disk = {
      ...
      data0 = {
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "data";
              };
            };
          };
        };
      };
      data1 = {
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "data";
              };
            };
          };
        };
      };
    };
    zpool = {
      data = {
        type = "zpool";
        mode = "mirror";
        rootFsOptions = {
          compression = "lz4";
          "com.sun:auto-snapshot" = "true";
        };
        postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^data@blank$' || zfs snapshot data@blank";

        datasets = {
          "main" = {
            type = "zfs_fs";
            mountpoint = "/data";
          };
        };
      };
    };
  };

Got any idea why the nomount is needed? It still mounts correctly, it just shows up as failing on boot, and if nomount isn't set it blocks boot.

00:26:21
@pandapip1:matrix.orgpandapip1 *

I've had this in my config for a while

  fileSystems."/data".options = [ "nofail" ]; # TODO find out why we need this!
  # Notably, https://github.com/nix-community/disko/blob/3a9450b26e69dcb6f8de6e2b07b3fc1c288d85f5/tests/zfs.nix#L12 also needs this
  disko.devices = {
    disk = {
      ...
      data0 = {
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "data";
              };
            };
          };
        };
      };
      data1 = {
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "data";
              };
            };
          };
        };
      };
    };
    zpool = {
      data = {
        type = "zpool";
        mode = "mirror";
        rootFsOptions = {
          compression = "lz4";
          "com.sun:auto-snapshot" = "true";
        };
        postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^data@blank$' || zfs snapshot data@blank";

        datasets = {
          "main" = {
            type = "zfs_fs";
            mountpoint = "/data";
          };
        };
      };
    };
  };

Got any idea why the nomount is needed? It still mounts correctly, it just shows up as failing on boot, and if nomount isn't set it blocks boot.

00:26:30
@pandapip1:matrix.orgpandapip1 *

I've had this in my config for a while

  fileSystems."/data".options = [ "nofail" ]; # TODO find out why we need this!
  # Notably, https://github.com/nix-community/disko/blob/3a9450b26e69dcb6f8de6e2b07b3fc1c288d85f5/tests/zfs.nix#L12 also needs this
  disko.devices = {
    disk = {
      ...
      data0 = {
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "data";
              };
            };
          };
        };
      };
      data1 = {
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "data";
              };
            };
          };
        };
      };
    };
    zpool = {
      data = {
        type = "zpool";
        mode = "mirror";
        rootFsOptions = {
          compression = "lz4";
          "com.sun:auto-snapshot" = "true";
        };
        postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^data@blank$' || zfs snapshot data@blank";

        datasets = {
          "main" = {
            type = "zfs_fs";
            mountpoint = "/data";
          };
        };
      };
    };
  };

Got any idea why the nofail is needed? It still mounts correctly, it just shows up as failing on boot, and if nofail isn't set it blocks boot.

00:27:50
@matthewcroughan:defenestrate.itmatthewcroughanhmm18:48:19
@matthewcroughan:defenestrate.itmatthewcroughannixos-disko-images-aarch64-linux> [2026-04-12T18:47:09Z INFO virtiofsd] Client disconnected, shutting down nixos-disko-images-aarch64-linux> [2026-04-12T18:47:09Z INFO virtiofsd] Client disconnected, shutting down nixos-disko-images-aarch64-linux> Virtual machine didn't produce an exit code. error: build of '/nix/store/iqb7h2cw2bgh42l6pkijwm4g1fcqwzcw-nixos-disko-images.drv' on 'ssh-ng://nix-ssh@m2u' failed: Cannot build '/nix/store/iqb7h2cw2bgh42l6pkijwm4g1fcqwzcw-nixos-disko-images.drv'.18:48:21
@matthewcroughan:defenestrate.itmatthewcroughanthat's a new one18:48:22
@matthewcroughan:defenestrate.itmatthewcroughanWhy does disko spew tons of empty newlines?18:54:44
@matthewcroughan:defenestrate.itmatthewcroughanimage.png
Download image.png
18:54:46
@matthewcroughan:defenestrate.itmatthewcroughanextraPostVM logs don't go here either18:55:01
@matthewcroughan:defenestrate.itmatthewcroughansomething wants to get out and log, but not sure what18:56:09
@emma:rory.gay@emma:rory.gay left the room.18:57:01
@matthewcroughan:defenestrate.itmatthewcroughan *
nixos-disko-images-aarch64-linux> \[2026-04-12T18:47:09Z INFO  virtiofsd\] Client disconnected, shutting down
nixos-disko-images-aarch64-linux> \[2026-04-12T18:47:09Z INFO  virtiofsd\] Client disconnected, shutting down
nixos-disko-images-aarch64-linux> Virtual machine didn't produce an exit code.
error: build of '/nix/store/iqb7h2cw2bgh42l6pkijwm4g1fcqwzcw-nixos-disko-images.drv' on 'ssh-ng://nix-ssh@m2u' failed: Cannot build '/nix/store/iqb7h2cw2bgh42l6pkijwm4g1fcqwzcw-nixos-disko-images.drv'.
18:57:19
@matthewcroughan:defenestrate.itmatthewcroughan The issue goes away with increased memSize 18:57:39
@matthewcroughan:defenestrate.itmatthewcroughanI guess this is another bug, but somehow logging doesn't catch it18:57:50
@matthewcroughan:defenestrate.itmatthewcroughan* I guess this is another bug, but somehow logging doesn't work this time around18:58:00
@matthewcroughan:defenestrate.itmatthewcroughan Is there any opposition for a general purpose compression command lassulus ? 19:04:47
@matthewcroughan:defenestrate.itmatthewcroughanI already tried this once and you said no, that others should configure it themselves19:04:57
@matthewcroughan:defenestrate.itmatthewcroughanBut IMO it should not be, it should be an option like it is in repart19:05:08
@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

There are no newer messages yet.


Back to Room ListRoom Version: 10