diff options
Diffstat (limited to '.vim/snippets/shell.nix')
-rw-r--r-- | .vim/snippets/shell.nix | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/.vim/snippets/shell.nix b/.vim/snippets/shell.nix index 6647b8c..2e58365 100644 --- a/.vim/snippets/shell.nix +++ b/.vim/snippets/shell.nix @@ -1,16 +1,22 @@ let - name = ""; - + name = "nix-shell.pure"; pkgs = import <nixpkgs> { }; -in pkgs.mkShell { + 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; - - buildInputs = [ ]; - - shellHook = '' - export PS1='\h (${name}) \W \$ ' - ''; + shellHook = "exec ${shell}/bin/${shell.name}"; } |