From 540cd416f689b2eaf482752bec1f0c0417b37537 Mon Sep 17 00:00:00 2001 From: zerox Date: Mon, 26 Aug 2024 09:48:53 +0500 Subject: [PATCH] zfs: add ability to specify full path of to the disk. --- lib/types/zpool.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types/zpool.nix b/lib/types/zpool.nix index b7e35d3..f6167be 100644 --- a/lib/types/zpool.nix +++ b/lib/types/zpool.nix @@ -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);