From 87d4b20f4d463156f05682bfa3112d2e13bec13a Mon Sep 17 00:00:00 2001 From: Christopher Haar Date: Fri, 10 Jul 2026 13:36:56 +0200 Subject: [PATCH] feat(nix): drop into dev shell Signed-off-by: Christopher Haar --- nix/apps.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nix/apps.nix b/nix/apps.nix index 691c02e9..4073ed6c 100644 --- a/nix/apps.nix +++ b/nix/apps.nix @@ -129,6 +129,7 @@ pkgs.kind pkgs.kubectl pkgs.docker-client + pkgs.nix ]; inheritPath = false; text = '' @@ -137,6 +138,15 @@ ln -s ${functionsPkg} _output/functions crossplane project run "$@" + + # When running via nix.sh, the cluster lives inside the container's + # Docker daemon and would vanish when the container exits. Drop into + # a dev shell so the user can interact with it before exiting. + if [ "''${NIX_SH_CONTAINER:-}" = "1" ]; then + echo "" + echo "Entering development shell (exit to stop)..." + exec nix develop + fi ''; } );