zfs: add ability to specify full path of to the disk.

This commit is contained in:
zerox 2024-08-26 09:48:53 +05:00
parent 8d071db09b
commit 540cd416f6
No known key found for this signature in database
GPG key ID: 946D1D3BC8514FCA

View file

@ -117,7 +117,7 @@ in
format_output = (mode: members: ''
entries+=("${mode}=${
lib.concatMapStringsSep " "
(d: "/dev/disk/by-partlabel/disk-${d}-zfs") members
(d: if lib.strings.hasPrefix "/" d then d else "/dev/disk/by-partlabel/disk-${d}-zfs") members
}")
'');
format_vdev = (vdev: format_output vdev.mode vdev.members);