mirror of
https://github.com/nix-community/disko.git
synced 2026-12-05 15:33:28 +01:00
types/lvm_vg: create 100% size lvs last
This commit is contained in:
1 parent
af27d7917d
commit
e1d5b132d1
1 file changed
+6
-2
+6
-2
@@ -53,7 +53,11 @@
|
|||||||
};
|
};
|
||||||
_create = diskoLib.mkCreateOption {
|
_create = diskoLib.mkCreateOption {
|
||||||
inherit config options;
|
inherit config options;
|
||||||
default = _: ''
|
default = _:
|
||||||
|
let
|
||||||
|
sortedLvs = lib.sort (a: _: !lib.hasInfix "100%" a.size) (lib.attrValues config.lvs);
|
||||||
|
in
|
||||||
|
''
|
||||||
readarray -t lvm_devices < <(cat "$disko_devices_dir"/lvm_${config.name})
|
readarray -t lvm_devices < <(cat "$disko_devices_dir"/lvm_${config.name})
|
||||||
vgcreate ${config.name} \
|
vgcreate ${config.name} \
|
||||||
"''${lvm_devices[@]}"
|
"''${lvm_devices[@]}"
|
||||||
@@ -66,7 +70,7 @@
|
|||||||
${toString lv.extraArgs} \
|
${toString lv.extraArgs} \
|
||||||
${config.name}
|
${config.name}
|
||||||
${lib.optionalString (lv.content != null) (lv.content._create {dev = "/dev/${config.name}/${lv.name}";})}
|
${lib.optionalString (lv.content != null) (lv.content._create {dev = "/dev/${config.name}/${lv.name}";})}
|
||||||
'') (lib.attrValues config.lvs)}
|
'') sortedLvs}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
_mount = diskoLib.mkMountOption {
|
_mount = diskoLib.mkMountOption {
|
||||||
|
|||||||
Reference in new issue
Block a user