types.table: get device mountOptions the correct way

This commit is contained in:
lassulus 2023-01-28 16:52:04 +01:00
parent 08dc4d06da
commit f49536f004

View file

@ -211,7 +211,7 @@ rec {
in ''
set -efux
# first create the necessary devices
${concatMapStrings (dev: ((attrByPath (dev ++ [ "_mount" ]) "" devices) {}).dev or "") sortedDeviceList}
${concatMapStrings (dev: ((attrByPath (dev ++ [ "_mount" ]) {} devices) {}).dev or "") sortedDeviceList}
# and then mount the filesystems in alphabetical order
${concatStrings (attrValues fsMounts)}
@ -680,9 +680,7 @@ rec {
let
partMounts = diskoLib.deepMergeMap (partition: partition._mount {inherit dev;}) config.partitions;
in {
dev = ''
${concatMapStrings (x: x.dev or "") (attrValues partMounts)}
'';
dev = partMounts.dev or "";
fs = partMounts.fs or {};
};
};