fix: make optionsAfterCreate optional.

This commit is contained in:
phaer 2022-12-28 16:35:23 +01:00
parent 49badf305f
commit fb229950e0

View File

@ -1159,7 +1159,9 @@ rec {
${concatStringsSep " " (mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \
${concatStringsSep " " (mapAttrsToList (n: v: "-O ${n}=${v}") config.rootFsOptions)} \
''${ZFSDEVICES_${config.name}}
zfs set ${concatStringsSep " " (mapAttrsToList (n: v: "${n}=${v}") config.optionsAfterCreate)} ${config.name}
${lib.optionalString
(config.optionsAfterCreate != {})
"zfs set ${concatStringsSep " " (mapAttrsToList (n: v: "${n}=${v}") config.optionsAfterCreate)} ${config.name}"}
${concatMapStrings (dataset: dataset._create config.name) (attrValues config.datasets)}
'';
description = "Creation script";