mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-30 19:54:43 +00:00
lnl: load :u packages in current instead of a subshell
This commit is contained in:
parent
e274978a65
commit
da52dc006c
1 changed files with 12 additions and 4 deletions
|
@ -168,6 +168,8 @@
|
||||||
# Dotfiles.
|
# Dotfiles.
|
||||||
# programs.vim.package = mkForce pkgs.lnl.vim;
|
# programs.vim.package = mkForce pkgs.lnl.vim;
|
||||||
|
|
||||||
|
programs.bash.enableCompletion = true;
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
programs.zsh.enableBashCompletion = true;
|
programs.zsh.enableBashCompletion = true;
|
||||||
programs.zsh.enableFzfCompletion = true;
|
programs.zsh.enableFzfCompletion = true;
|
||||||
|
@ -201,10 +203,6 @@
|
||||||
nix repl ''${@:-<dotpkgs>}
|
nix repl ''${@:-<dotpkgs>}
|
||||||
}
|
}
|
||||||
|
|
||||||
:u() {
|
|
||||||
nix run -f '<dotpkgs>' "$1" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
:d() {
|
:d() {
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
}
|
}
|
||||||
|
@ -213,6 +211,16 @@
|
||||||
direnv reload
|
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() {
|
xi() {
|
||||||
curl -F 'f:1=<-' ix.io
|
curl -F 'f:1=<-' ix.io
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue