mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
tidy: apply suggestions from code review
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
This commit is contained in:
parent
c9d3bc3755
commit
071306e76a
1 changed files with 5 additions and 5 deletions
|
@ -135,16 +135,16 @@ in
|
|||
inherit config options;
|
||||
default =
|
||||
let
|
||||
formatOutput = (mode: members: ''
|
||||
formatOutput = mode: members: ''
|
||||
entries+=("${mode}=${
|
||||
lib.concatMapStringsSep " "
|
||||
(d: if lib.strings.hasPrefix "/" d then d else "/dev/disk/by-partlabel/disk-${d}-zfs") members
|
||||
}")
|
||||
'');
|
||||
formatVdev = (vdev: formatOutput vdev.mode vdev.members);
|
||||
'';
|
||||
formatVdev = vdev: formatOutput vdev.mode vdev.members;
|
||||
hasTopology = !(builtins.isString config.mode);
|
||||
mode = if !hasTopology then config.mode else "prescribed";
|
||||
topology = if hasTopology then config.mode.topology else { };
|
||||
mode = if hasTopology then "prescribed" else config.mode;
|
||||
topology = lib.optionalAttrs hasTopology config.mode.topology;
|
||||
in
|
||||
''
|
||||
readarray -t zfs_devices < <(cat "$disko_devices_dir"/zfs_${config.name})
|
||||
|
|
Loading…
Reference in a new issue