1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

lnl: load :u packages in current instead of a subshell

This commit is contained in:
Daiderd Jordan 2019-09-24 00:26:29 +02:00
parent e274978a65
commit da52dc006c
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -168,6 +168,8 @@
# Dotfiles.
# programs.vim.package = mkForce pkgs.lnl.vim;
programs.bash.enableCompletion = true;
programs.zsh.enable = true;
programs.zsh.enableBashCompletion = true;
programs.zsh.enableFzfCompletion = true;
@ -201,10 +203,6 @@
nix repl ''${@:-<dotpkgs>}
}
:u() {
nix run -f '<dotpkgs>' "$1" "$@"
}
:d() {
eval "$(direnv hook zsh)"
}
@ -213,6 +211,16 @@
direnv reload
}
:u() {
local exports
exports=$(direnv apply_dump <(nix-shell -E "with import <dotpkgs> {}; mkShell { buildInputs = [ $* ]; }" --run 'direnv dump'))
eval "$exports"
name+="''${name:+ }$*"
typeset -U PATH
}
xi() {
curl -F 'f:1=<-' ix.io
}