User avatar
lis comfytea lesbianthoughts @lis@mk.catgirlsfor.science
3mo
:omya_nix: at what point is fiddling with disko actually worth it, vs partitioning by hand and taking notes on how you did it?
2
0
1
0
User avatar
lis comfytea lesbianthoughts @lis@mk.catgirlsfor.science
3mo
:omya_nix: it would help if it wasn't so fucking verbose

i mean
disk.foo = {
  type = "disk";
  content = {
    type = "gpt";
    partitions.bar = {
      type = "filesystem";
      format = "ext4";
      # ...
    };
};

zpool.baz = {
  type = "zpool";
  # ...
};



get some reasonable defaults ffs
1
0
2
0
User avatar
lis comfytea lesbianthoughts @lis@mk.catgirlsfor.science
3mo
:omya_nix: oh yea if you want a partition with btrfs you do type = "btrfs"; instead

because

type refers to actual types. in the nixos module system. and since btrfs, unlike all other available filesystems¹, has additional config options (subvolumes) that can't be specified in the mount options, it needs to be its own type
¹ apart from ZFS, which of course works entirely differently
1
0
2
0
User avatar
lis comfytea lesbianthoughts @lis@mk.catgirlsfor.science
3mo
:omya_nix: although i'm pretty sure you can do type = "filesystem"; format = "btrfs"; too, you just don't get to use subvolumes and have swapfiles if you do (at least not declaratively)
1
0
1
0
User avatar
flori_ava_star:~cursor_blinking made-with-estrogen verifiedlesbian @star@amazonawaws.com
3mo
:omya_nix: @lis you rant of this yet I fall in love with disko more every time you post...
💜1
1
0
1
1

User avatar
lis comfytea lesbianthoughts @lis@mk.catgirlsfor.science
3mo
:omya_nix: @star wait until you run into one of its three failure modes and spend half a day figuring out what went wrong, with each attempt to fix one failure randomly causing one of the other two

the three failure modes being your standard nix eval error, the image builder VM kernel panicking, and the image builder VM hanging during shutdown

disko can output scripts to partition some disks, readily partitioned disk images, or a VM using those images. the builder VM failures only happen when you try building the latter. so just because you succeeded in building a script to partition some disks, doesn't mean you can have images of them

if you try to build anything containing a luks partition and forget to set
disko.memSize, the builder VM will panic, because that value is 1024 (MiB) by default, and opening(/creating?) a luks partition uses at least that much by design.

if you try to build anything containing a luks partition and forget to supply a password file (declaratively!), the builder VM will either panic or hang. the script would just ask you for a password, but that's of course not an option during a build.

if you make some silly mistake like
mountOptions = [ "mode = 755" ];, the builder VM will hang. no idea why.

if you mess up the nested types and this isn't caught during evaluation, the builder VM may panic, hang, or produce nonsense.

and it's
really easy to make these mistakes because there's so much boilerplate, things get messy and confusing, there are no assertions to catch the most glaring mistakes, and the type system is mostly an implementation detail that still burdens you with writing loads of boilerplate and barely helps you with anything.

oh and of course none of this is documented
0
0
0
0