From d4289976768c72d347ff2bdcf3062a8a2eb29fbb Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Wed, 23 Dec 2020 20:39:02 +0530 Subject: nix helper aliases --- external/zsh/aliases/dev.zsh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'external/zsh') diff --git a/external/zsh/aliases/dev.zsh b/external/zsh/aliases/dev.zsh index 9128777..1e6587f 100644 --- a/external/zsh/aliases/dev.zsh +++ b/external/zsh/aliases/dev.zsh @@ -1,11 +1,17 @@ alias aws="docker run --rm -it amazon/aws-cli" -nrx() { nix-shell -p nodejs-14_x --run "npm run $1"; } +# nix shell with zsh +nix-zsh() { nix-shell --run "WITH_NIX_PREFIX='${NX_PREFIX:-':'}' zsh" "$@"; } -with_node_14() { nix-shell -p nodejs-14_x --run 'WITH_NIX_PREFIX="node14" zsh'; } +# shell for node 14 +with_node_14() { NX_PREFIX="node14" nix-zsh -p nodejs-14_x "$@"; } -nix-zshell() { nix-shell --run 'WITH_NIX_PREFIX=":" zsh' "$@"; } +# shell for docker-compose +with_dcomp() { TMPDIR=$HOME/dump/tempdir NX_PREFIX=docker-compose nix-zsh -p docker-compose; } + +# npm run for node_14 +nrx() { with_node_14 --run "npm run $*"; } # :: Filename Pattern Replacetext far() { -- cgit v1.3.1