namespace hooks via subshell

This commit is contained in:
phaer committed 2023-01-19 13:07:31 +01:00
1 parent 0e658ad7f7
commit 92467bb9a8
1 file changed
+3 -1
+3 -1
View File
@@ -155,11 +155,13 @@ rec {
readOnly = true;
type = types.functionTo types.str;
default = args:
lib.concatStrings [
lib.concatStringsSep "\n" [
"(" # subshell for namespacing
(diskoLib.defineHookVariables { inherit config options; })
config.preCreateHook
(default args)
config.postCreateHook
")"
];
description = "Creation script";
};