aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--example/flake.nix4
-rw-r--r--lib/mk-dev-shell.nix2
2 files changed, 6 insertions, 0 deletions
diff --git a/example/flake.nix b/example/flake.nix
index 86accf7..0479e01 100644
--- a/example/flake.nix
+++ b/example/flake.nix
@@ -37,6 +37,10 @@
37 DATABASE_URL = "postgresql:///${PGDATABASE}?host=${PGHOST}"; 37 DATABASE_URL = "postgresql:///${PGDATABASE}?host=${PGHOST}";
38 }; 38 };
39 39
40 prePrompt = ''
41 echo "<C-d> to exit this development shell."
42 '';
43
40 shell = null; 44 shell = null;
41 }; 45 };
42 } 46 }
diff --git a/lib/mk-dev-shell.nix b/lib/mk-dev-shell.nix
index fe2ac02..cc7d940 100644
--- a/lib/mk-dev-shell.nix
+++ b/lib/mk-dev-shell.nix
@@ -2,6 +2,7 @@ flake:
2{ pkgs 2{ pkgs
3, tools ? [] 3, tools ? []
4, envVars ? {} 4, envVars ? {}
5, prePrompt ? ""
5, shell ? null 6, shell ? null
6}: 7}:
7 8
@@ -16,6 +17,7 @@ in pkgs.mkShell {
16 ${shellLib.ifSomeAttrs envVars shellLib.printEnvVars} 17 ${shellLib.ifSomeAttrs envVars shellLib.printEnvVars}
17 ${shellLib.ifSomeList tools shellLib.printBins} 18 ${shellLib.ifSomeList tools shellLib.printBins}
18 echo 19 echo
20 ${prePrompt}
19 21
20 ${if (shell != null) then shell else shellLib.startUserShell} 22 ${if (shell != null) then shell else shellLib.startUserShell}
21 exit $? 23 exit $?