!oNSIfazDqEcwhcOjSL:matrix.org

disko

395 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko108 Servers

Load older messages


SenderMessageTime
14 Mar 2026
@matthewcroughan:defenestrate.itmatthewcroughansometimes kernel panic, sometimes cp fails18:20:00
@lassulus:lassul.uslassuluswell auto calculating it is hard, you can adjust the outer image size, but arranging the partitions is a pretty hard problem :D18:20:32
@matthewcroughan:defenestrate.itmatthewcroughanAuto calculating it is half of what systemd-repart's logic is for yeah18:20:41
@matthewcroughan:defenestrate.itmatthewcroughanit's very hard18:20:44
@matthewcroughan:defenestrate.itmatthewcroughanand a lot of postmarketOS code exists to do the smae18:20:53
@matthewcroughan:defenestrate.itmatthewcroughan* and a lot of postmarketOS code exists to do the same18:20:55
@matthewcroughan:defenestrate.itmatthewcroughanperhaps we could have an auto calculating implementation for each supported FS in disko18:21:18
@matthewcroughan:defenestrate.itmatthewcroughanand if your FS doesn't support auto calculation, then tough luck, set the imageSize18:22:06
@lassulus:lassul.uslassulusquestion is where the size is allocated, is it only /nix/store? what happens if you have something like size = "10%" in there? do we make the diskImage 10x your close size?18:22:52
@matthewcroughan:defenestrate.itmatthewcroughanimageSize = "10%" ?18:23:29
@lassulus:lassul.uslassuluswhat happens if you have size = "1G" for your /nix/store partition? just error out?18:23:40
@matthewcroughan:defenestrate.itmatthewcroughanah I see, uh18:24:02
@matthewcroughan:defenestrate.itmatthewcroughan
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "edpool";
              };
            };

18:24:11
@matthewcroughan:defenestrate.itmatthewcroughanis what I have right now18:24:14
@matthewcroughan:defenestrate.itmatthewcroughan *
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = "edpool";
              };
            };
18:24:19
@lassulus:lassul.uslassulusyes, that is the trivial case :)18:24:24
@matthewcroughan:defenestrate.itmatthewcroughan error: A definition for option disko.devices.disk.disk1.content.partitions.zfs.size' is not of type value "100%" (singular enum) or str… ┃ - In /nix/store/g8pkz1bxk5n7vvicr9nk0wklgrqp0k9y-source/hosts/ed/disko.nix': "10%` 18:24:43
@lassulus:lassul.uslassulusdon't think zfs can do other sizes than 100% or fixed block size18:25:25
@lassulus:lassul.uslassuluslvm can do other %18:25:33
@matthewcroughan:defenestrate.itmatthewcroughanYou can set 1G18:25:38
@matthewcroughan:defenestrate.itmatthewcroughanthe only reason I'm using this image builder is because I don't trust the diskoScript to do the right thing, on my laptop 18:27:38
@matthewcroughan:defenestrate.itmatthewcroughanRunning the diskoScript on an existing machine is fine, except in the case of zfs where weird things happen because of pool names18:27:57
@matthewcroughan:defenestrate.itmatthewcroughan And also nixos-install on a running machine is weird too, I've had it fsck up because it installed the bootloader for the target into my real /boot 18:28:37
@lassulus:lassul.uslassulusI guess we could write a script that copies the closure into the image and it can check before it runs if there is enough space, since it's easier to do this when everything is mounted18:30:26
@lassulus:lassul.uslassuluswould still be a build time error18:30:38
@lassulus:lassul.uslassulusbut we could raise a better error message18:30:45
@matthewcroughan:defenestrate.itmatthewcroughanAt the great cost of build time 18:31:34
@matthewcroughan:defenestrate.itmatthewcroughanYou're going to 2x the build time if you do that18:31:43
@matthewcroughan:defenestrate.itmatthewcroughanjust for a check18:31:47
@matthewcroughan:defenestrate.itmatthewcroughanThe image builder as-is is pretty snappy, but copying the large toplevel twice is going to make that experience worse18:32:31

Show newer messages


Back to Room ListRoom Version: 10