mirror of
https://github.com/nix-community/disko.git
synced 2024-09-17 09:37:17 +03:00
support zvol with disko
this is useful for quick testing.
This commit is contained in:
parent
9f58230409
commit
78ea07107a
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user