From 92467bb9a84bbb062d214c4554b621acaf3d3011 Mon Sep 17 00:00:00 2001 From: phaer Date: Tue, 10 Jan 2023 10:53:14 +0100 Subject: [PATCH] namespace hooks via subshell --- types.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types.nix b/types.nix index fbf5744..9c44197 100644 --- a/types.nix +++ b/types.nix @@ -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"; };