]> git.giacomolli.uk - onechat/blobdiff - nix/devshell.nix
Rewrite the README as a user guide
[onechat] / nix / devshell.nix
index fdf65e96921cf546d418db10aea78cba0017f46d..110a7c490a43988bb39964bc7818be970dfc4a2e 100644 (file)
@@ -22,5 +22,8 @@ pkgs.mkShell {
 
   shellHook = ''
     git config core.hooksPath .githooks 2>/dev/null || true
+    root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
+    export ONECHAT_DIR="''${ONECHAT_DIR:-$root/.devenv/onechat}"
+    unset root
   '';
 }