aboutsummaryrefslogtreecommitdiff
path: root/.config/nixpkgs
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2023-02-18 05:26:48 -0500
committertdro <tdro@users.noreply.github.com>2023-02-18 05:26:48 -0500
commite8c1ee5e89dcd0f2ab845303be0f96b2529632d8 (patch)
tree03ef1c0456e131f3bad5648945b4eb118745f437 /.config/nixpkgs
parent23571c127bbd50f94daa260b47c3a8c4660c6505 (diff)
downloaddotfiles-e8c1ee5e89dcd0f2ab845303be0f96b2529632d8.tar.gz
dotfiles-e8c1ee5e89dcd0f2ab845303be0f96b2529632d8.tar.bz2
dotfiles-e8c1ee5e89dcd0f2ab845303be0f96b2529632d8.zip
.config/nixpkgs/shells: Add self contained pure env shell
Diffstat (limited to '.config/nixpkgs')
-rw-r--r--.config/nixpkgs/shells/pure.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/.config/nixpkgs/shells/pure.nix b/.config/nixpkgs/shells/pure.nix
new file mode 100644
index 0000000..2e58365
--- /dev/null
+++ b/.config/nixpkgs/shells/pure.nix
@@ -0,0 +1,22 @@
+let
+
+ name = "nix-shell.pure";
+ pkgs = import <nixpkgs> { };
+
+ shell = pkgs.writeShellApplication {
+ inherit name;
+ text = ''
+ /usr/bin/env --ignore-environment /bin/sh -c ${
+ pkgs.writeScript name ''
+ export PS1='\h (${name}) \W \$ '
+ export PATH=${pkgs.lib.strings.makeBinPath [ pkgs.busybox ]}
+ /bin/sh
+ ''
+ };
+ '';
+ };
+
+in pkgs.mkShell {
+ inherit name;
+ shellHook = "exec ${shell}/bin/${shell.name}";
+}