From 78ea07107a1bded9ad2460c510a3c8db998c354a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 2 Feb 2023 14:11:49 +0100 Subject: [PATCH] support zvol with disko this is useful for quick testing. --- types/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/default.nix b/types/default.nix index 96c7dfa..bdfb94f 100644 --- a/types/default.nix +++ b/types/default.nix @@ -55,12 +55,14 @@ rec { deviceNumbering = dev: index: if match "/dev/[vs]d.+" dev != null then dev + toString index # /dev/{s,v}da style - else if match "/dev/disk/.+" dev != null then - "${dev}-part${toString index}" # /dev/disk/by-id/xxx style + else if match "/dev/(disk|zvol)/.+" dev != null then + "${dev}-part${toString index}" # /dev/disk/by-id/xxx style, also used by zfs's zvolumes else if match "/dev/(nvme|md/|mmcblk).+" dev != null then "${dev}p${toString index}" # /dev/nvme0n1p1 style else - abort "${dev} seems not to be a supported disk format"; + abort '' + ${dev} seems not to be a supported disk format. Please add this to disko in https://github.com/nix-community/disko/blob/master/types/default.nix + ''; /* A nix option type representing a json datastructure, vendored from nixpkgs to avoid dependency on pkgs */ jsonType =