mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
style: concatStrings map -> concatMapStrings
This commit is contained in:
parent
8e4b2d1e3b
commit
ac991c281b
1 changed files with 5 additions and 5 deletions
10
types.nix
10
types.nix
|
|
@ -141,7 +141,7 @@ rec {
|
|||
sortedDeviceList = diskoLib.sortDevicesByDependencies ((diskoLib.meta devices).deviceDependencies or {}) devices;
|
||||
in ''
|
||||
set -efux
|
||||
${concatStrings (map (dev: attrByPath (dev ++ [ "_create" ]) "" devices) sortedDeviceList)}
|
||||
${concatMapStrings (dev: attrByPath (dev ++ [ "_create" ]) "" devices) sortedDeviceList}
|
||||
'';
|
||||
/* Takes a disko device specification and returns a string which mounts the disks
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ rec {
|
|||
in ''
|
||||
set -efux
|
||||
# first create the necessary devices
|
||||
${concatStrings (map (dev: attrByPath (dev ++ [ "_mount" "dev" ]) "" devices) sortedDeviceList)}
|
||||
${concatMapStrings (dev: attrByPath (dev ++ [ "_mount" "dev" ]) "" devices) sortedDeviceList}
|
||||
|
||||
# and then mount the filesystems in alphabetical order
|
||||
# attrValues returns values sorted by name. This is important, because it
|
||||
|
|
@ -657,7 +657,7 @@ rec {
|
|||
partMounts = diskoLib.deepMergeMap (partition: partition._mount dev) config.partitions;
|
||||
in {
|
||||
dev = ''
|
||||
${concatStrings (map (x: x.dev or "") (attrValues partMounts))}
|
||||
${concatMapStrings (x: x.dev or "") (attrValues partMounts)}
|
||||
'';
|
||||
fs = partMounts.fs or {};
|
||||
};
|
||||
|
|
@ -948,7 +948,7 @@ rec {
|
|||
in {
|
||||
dev = ''
|
||||
vgchange -a y
|
||||
${concatStrings (map (x: x.dev or "") (attrValues lvMounts))}
|
||||
${concatMapStrings (x: x.dev or "") (attrValues lvMounts)}
|
||||
'';
|
||||
fs = lvMounts.fs;
|
||||
};
|
||||
|
|
@ -1186,7 +1186,7 @@ rec {
|
|||
in {
|
||||
dev = ''
|
||||
zpool list '${config.name}' >/dev/null 2>/dev/null || zpool import '${config.name}'
|
||||
${concatStrings (map (x: x.dev or "") (attrValues datasetMounts))}
|
||||
${concatMapStrings (x: x.dev or "") (attrValues datasetMounts)}
|
||||
'';
|
||||
fs = datasetMounts.fs // optionalAttrs (!isNull config.mountpoint) {
|
||||
${config.mountpoint} = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue