| 11 Feb 2024 |
eyJhb | Anyone that can see the flaw in that config? Error is
+ readarray -t zfs_devices
++ cat /tmp/tmp.gk3UVSF6cj/zfs_rpool
cat: /tmp/tmp.gk3UVSF6cj/zfs_rpool: No such file or directory
+ zpool create -f rpool -R /mnt -O compression=zstd
missing vdev specification
usage:
create [-fnd] [-o property=value] ...
[-O file-system-property=value] ...
[-m mountpoint] [-R root] <pool> <vdev> ...
+ rm -rf /tmp/tmp.gk3UVSF6cj
| 11:59:42 |
matthewcroughan | Doesn't look like the partitions are the same as the example | 12:01:18 |
matthewcroughan | https://github.com/nix-community/disko/blob/master/example/zfs.nix#L9-L27 | 12:01:23 |
matthewcroughan | you don't have a partitions.boot.content | 12:01:35 |
eyJhb | They are yoinked directly from here https://github.com/nix-community/nixos-anywhere-examples/blob/main/disk-config.nix#L9-L25 | 12:02:14 |
matthewcroughan | you have disk.disk1.content instead of idks.disk1.partitions.boot.content | 12:02:17 |
matthewcroughan | * you have disk.disk1.content instead of diss.disk1.partitions.boot.content | 12:02:22 |
matthewcroughan | * you have disk.disk1.content instead of disk.disk1.partitions.boot.content | 12:02:33 |
matthewcroughan | the nixos-anywhere examples may be outdated compared to the disko examples which have tests for them | 12:02:50 |
matthewcroughan | what you can do is try to make a test for this disk-config.nix directly in the disko repo and try to run the VM test for that, to see if it works or gives you the same error | 12:03:21 |
matthewcroughan | it's hard to debug otherwise, unless a VM test is made | 12:03:27 |
eyJhb | The disk-config.nix works for the nixos-anywhere-examples, but not when I've tried to change it to zfs | 12:03:49 |
eyJhb | * The disk-config.nix works from the nixos-anywhere-examples, but not when I've tried to change it to zfs | 12:04:03 |
matthewcroughan | oh, well then you need to follow the zfs example that I linked | 12:04:05 |
eyJhb | That's what I've been trying to follow :p - I'm very unsure what should be in the file it tries to cat. | 12:04:30 |
eyJhb | I think I found the issue | 12:04:48 |
eyJhb | Trying again | 12:04:51 |
matthewcroughan | I can't spot the problem directly in your example, because this is one of the larger modules with deeply nested options, so it's quite hard, but I assure you that if you put your code on the left, and the ZFS example on the right, you will spot it | 12:04:52 |
lassulus | Pool should be rpool | 12:06:23 |
matthewcroughan | ah damn :D | 12:06:29 |
lassulus | Not zpool | 12:06:31 |
matthewcroughan | is there no way to have Nix warn you about that, like "Did you mean rpool?" | 12:06:45 |
eyJhb | In reply to @lassulus:lassul.us Pool should be rpool Yeah, that's the thing I'm trying now. I changed it once, but ... I just changed it from zroot to zpool.............. | 12:07:02 |
eyJhb | In reply to @matthewcroughan:defenestrate.it is there no way to have Nix warn you about that, like "Did you mean rpool?" Make it include clippy as well. Disko clippy | 12:07:30 |
eyJhb | Nice, now it doesn't fail while creating the disks! | 12:07:54 |
matthewcroughan | Hopefully zfs goes away and we get all the features in bcachefs | 12:07:59 |
matthewcroughan | less to maintain if that happens | 12:08:13 |
eyJhb | Would it make sense to have a check, that tries to check if there is a key in zpool that is the pool name :) | 12:08:23 |
eyJhb | * Would it make sense to have a check, that tries to check if there is a key in zpool that is the pool name? | 12:08:25 |
matthewcroughan | Well it really should check with regexp and throw a trace if it's anything other than rpool | 12:08:59 |