diff options
author | tdro <tdro@users.noreply.github.com> | 2023-02-18 05:26:48 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2023-02-18 05:26:48 -0500 |
commit | e8c1ee5e89dcd0f2ab845303be0f96b2529632d8 (patch) | |
tree | 03ef1c0456e131f3bad5648945b4eb118745f437 /.config/nixpkgs | |
parent | 23571c127bbd50f94daa260b47c3a8c4660c6505 (diff) | |
download | dotfiles-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.nix | 22 |
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}"; +} |