mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
support zvol with disko
this is useful for quick testing.
This commit is contained in:
parent
9f58230409
commit
78ea07107a
1 changed files with 5 additions and 3 deletions
|
|
@ -55,12 +55,14 @@ rec {
|
||||||
deviceNumbering = dev: index:
|
deviceNumbering = dev: index:
|
||||||
if match "/dev/[vs]d.+" dev != null then
|
if match "/dev/[vs]d.+" dev != null then
|
||||||
dev + toString index # /dev/{s,v}da style
|
dev + toString index # /dev/{s,v}da style
|
||||||
else if match "/dev/disk/.+" dev != null then
|
else if match "/dev/(disk|zvol)/.+" dev != null then
|
||||||
"${dev}-part${toString index}" # /dev/disk/by-id/xxx style
|
"${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
|
else if match "/dev/(nvme|md/|mmcblk).+" dev != null then
|
||||||
"${dev}p${toString index}" # /dev/nvme0n1p1 style
|
"${dev}p${toString index}" # /dev/nvme0n1p1 style
|
||||||
else
|
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 */
|
/* A nix option type representing a json datastructure, vendored from nixpkgs to avoid dependency on pkgs */
|
||||||
jsonType =
|
jsonType =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue