From e8c1ee5e89dcd0f2ab845303be0f96b2529632d8 Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 18 Feb 2023 05:26:48 -0500 Subject: .config/nixpkgs/shells: Add self contained pure env shell --- .config/nixpkgs/shells/pure.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .config/nixpkgs/shells/pure.nix (limited to '.config/nixpkgs') 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 { }; + + 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}"; +} -- cgit v1.2.3