!oNSIfazDqEcwhcOjSL:matrix.org

disko

387 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko101 Servers

Load older messages


SenderMessageTime
14 Mar 2026
@matthewcroughan:defenestrate.itmatthewcroughanthe fact that the disko image builder, inherits the kernel of the caller, is an architectural mistake, don't you think?16:36:23
@matthewcroughan:defenestrate.itmatthewcroughanthis means CI can't really tell you anything16:36:38
@matthewcroughan:defenestrate.itmatthewcroughanand in the case of building images for a raspberry pi, that will never work16:37:17
@matthewcroughan:defenestrate.itmatthewcroughanbecause this kernel is specific to the Pi, and won't boot under qemu16:37:26
@joerg:thalheim.ioMic92not sure we test on aarch64 at the moment16:37:41
@matthewcroughan:defenestrate.itmatthewcroughanah that too16:37:45
@matthewcroughan:defenestrate.itmatthewcroughanbut this is x86 in my case anyway16:37:55
@joerg:thalheim.ioMic92but also not sure if this is that is the problem either16:37:56
@matthewcroughan:defenestrate.itmatthewcroughan
  networking.hostId = "b7f38c2e"; # ZFS needs this set
  services.zfs.autoScrub.enable = true;
  boot = {
    supportedFilesystems = [ "zfs" ];
  };
  disko.devices = {
    disk = {
      disk1 = {
        device = "/dev/disk/by-id/usb-Realtek_RTL9210B-CG_012345679039-0:0";
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              size = "2G";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
              };
            };
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "edpool";
              };
            };
          };
        };
      };
    };
    zpool = {
      edpool = {
        type = "zpool";
        rootFsOptions = {
          acltype = "posixacl";
          compression = "zstd";
          dnodesize = "auto";
          normalization = "formD";
          relatime = "on";
          xattr = "sa";
        };
        options = {
          ashift = "12";
          autotrim = "on";
        };

        datasets = {
          "root" = {
            type = "zfs_fs";
            options = {
              mountpoint = "legacy";
            };
            mountpoint = "/";
          };
          "nix" = {
            type = "zfs_fs";
            options.mountpoint = "legacy";
            mountpoint = "/nix";
          };
          "var" = {
            type = "zfs_fs";
            options.mountpoint = "legacy";
            mountpoint = "/var";
          };
          "home" = {
            type = "zfs_fs";
            mountpoint = "/home";
            options.mountpoint = "legacy";
          };
        };
      };
    };
  };
}
16:38:25
@matthewcroughan:defenestrate.itmatthewcroughanThat's my disko config16:38:28
@matthewcroughan:defenestrate.itmatthewcroughan I was thinking btw, disko could auto generate the networking.hostId based on a hash of the device 16:38:52
@matthewcroughan:defenestrate.itmatthewcroughan * I was thinking btw, disko could auto generate the networking.hostId based on a hash of the device in pure nix 16:38:55
@matthewcroughan:defenestrate.itmatthewcroughanone less thing to worry about 16:39:01
@joerg:thalheim.ioMic92in srvos we set a fixed hostid16:39:43
@joerg:thalheim.ioMic92But it feels a bit overarching for disko to set this. It's a disk partitioning framework16:40:19
@joerg:thalheim.ioMic92* in srvos we set a fixed hostid for all machines16:40:24
@joerg:thalheim.ioMic92* But it feels a bit overarching for disko to set this. It's a disk partitioning framework and this feels more like general NixOS configuration16:40:42
@matthewcroughan:defenestrate.itmatthewcroughanAh sure, I guess you could just do the hashing trick that I mentioned in your own config16:47:24
@joerg:thalheim.ioMic92honestly I don't think this even needs hashing16:48:39
@joerg:thalheim.ioMic92I have seen no usecase yet for a per machine hostid, except if you have zfs hosted on iscsi network block devices and want to prevent accidents.16:49:11
@joerg:thalheim.ioMic92having the same hostid on your installer as on your machine makes things much easier to manage, which is why I set the the same hostid that the nixos installer uses16:49:46
@matthewcroughan:defenestrate.itmatthewcroughanIt's a per pool id isn't it?16:51:27
@matthewcroughan:defenestrate.itmatthewcroughanthe host id of the machine and pool are tied together so that you can't plug one pool into another pool16:51:56
@matthewcroughan:defenestrate.itmatthewcroughan* the host id of the machine and pool are tied together so that you can't plug one pool into another machine16:51:59
@matthewcroughan:defenestrate.itmatthewcroughan* the host id of the machine and pool are tied together so that you can't plug one pool into another machine, right?16:52:02
@matthewcroughan:defenestrate.itmatthewcroughanSo atm I cannot use disko to create disk images, because the kernel panics, and this has always been a buggy feature since 2024 evben16:54:23
@matthewcroughan:defenestrate.itmatthewcroughan* So atm I cannot use disko to create disk images, because the kernel panics, and this has always been a buggy feature since 2024 even16:54:25
@matthewcroughan:defenestrate.itmatthewcroughanLike, I haven't observed a scenario where disko image creation actually works as intended16:54:35
@matthewcroughan:defenestrate.itmatthewcroughanIt's not like I haven't contributed bug fixes, changes, I have 16:54:51
@matthewcroughan:defenestrate.itmatthewcroughanAre there any actual users?16:55:02

Show newer messages


Back to Room ListRoom Version: 10