also add indentation to the hooks

This commit is contained in:
name_snrl 2024-06-19 10:25:45 +05:00 committed by mergify[bot]
parent 248f65b9c4
commit 48580409a2

View file

@ -232,9 +232,9 @@ let
default = ''
( # ${config.type} ${concatMapStringsSep " " (n: toString (config.${n} or "")) ["name" "device" "format" "mountpoint"]} #
${diskoLib.indent (diskoLib.defineHookVariables { inherit options; })}
${config.preCreateHook}
${diskoLib.indent config.preCreateHook}
${diskoLib.indent attrs.default}
${config.postCreateHook}
${diskoLib.indent config.postCreateHook}
)
'';
description = "Creation script";
@ -250,9 +250,9 @@ let
if builtins.isString value then ''
(
${diskoLib.indent (diskoLib.defineHookVariables { inherit options; })}
${config.preMountHook}
${diskoLib.indent config.preMountHook}
${diskoLib.indent value}
${config.postMountHook}
${diskoLib.indent config.postMountHook}
)
'' else value)
attrs.default;