diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index 99a77e89..cda7e195 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -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 ''${@:-} } - :u() { - nix run -f '' "$1" "$@" - } - :d() { eval "$(direnv hook zsh)" } @@ -213,6 +211,16 @@ direnv reload } + :u() { + local exports + + exports=$(direnv apply_dump <(nix-shell -E "with import {}; mkShell { buildInputs = [ $* ]; }" --run 'direnv dump')) + eval "$exports" + + name+="''${name:+ }$*" + typeset -U PATH + } + xi() { curl -F 'f:1=<-' ix.io }