mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50: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;
|
sortedDeviceList = diskoLib.sortDevicesByDependencies ((diskoLib.meta devices).deviceDependencies or {}) devices;
|
||||||
in ''
|
in ''
|
||||||
set -efux
|
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
|
/* Takes a disko device specification and returns a string which mounts the disks
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ rec {
|
||||||
in ''
|
in ''
|
||||||
set -efux
|
set -efux
|
||||||
# first create the necessary devices
|
# 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
|
# and then mount the filesystems in alphabetical order
|
||||||
# attrValues returns values sorted by name. This is important, because it
|
# 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;
|
partMounts = diskoLib.deepMergeMap (partition: partition._mount dev) config.partitions;
|
||||||
in {
|
in {
|
||||||
dev = ''
|
dev = ''
|
||||||
${concatStrings (map (x: x.dev or "") (attrValues partMounts))}
|
${concatMapStrings (x: x.dev or "") (attrValues partMounts)}
|
||||||
'';
|
'';
|
||||||
fs = partMounts.fs or {};
|
fs = partMounts.fs or {};
|
||||||
};
|
};
|
||||||
|
|
@ -948,7 +948,7 @@ rec {
|
||||||
in {
|
in {
|
||||||
dev = ''
|
dev = ''
|
||||||
vgchange -a y
|
vgchange -a y
|
||||||
${concatStrings (map (x: x.dev or "") (attrValues lvMounts))}
|
${concatMapStrings (x: x.dev or "") (attrValues lvMounts)}
|
||||||
'';
|
'';
|
||||||
fs = lvMounts.fs;
|
fs = lvMounts.fs;
|
||||||
};
|
};
|
||||||
|
|
@ -1186,7 +1186,7 @@ rec {
|
||||||
in {
|
in {
|
||||||
dev = ''
|
dev = ''
|
||||||
zpool list '${config.name}' >/dev/null 2>/dev/null || zpool import '${config.name}'
|
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) {
|
fs = datasetMounts.fs // optionalAttrs (!isNull config.mountpoint) {
|
||||||
${config.mountpoint} = ''
|
${config.mountpoint} = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue