From d502ebb035c51a69229e214d539d507fcdeaec30 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Mon, 1 Apr 2019 21:02:48 +0200 Subject: nix: add nipr alias --- conf.d/99-nix.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conf.d/99-nix.zsh b/conf.d/99-nix.zsh index 8b877a3..200ebae 100644 --- a/conf.d/99-nix.zsh +++ b/conf.d/99-nix.zsh @@ -4,11 +4,21 @@ function cnip() { cd $(nip "$1") } +function nipr() { + local remote="$1" + local package="$2" + + local drv="$(nix-instantiate '' -A "$package")" + nix-copy-closure --to "$remote" "$drv" + ssh "$remote" nix-store -r "$drv" +} + function with() { PKG="$1" shift nix-shell -p "$PKG" --run "$@" } +alias zwith='nix-shell --run zsh -p' alias niv='nix eval -f ""' alias nic=nix-channel @@ -18,6 +28,7 @@ alias nir="nix repl ''" alias nio=nixops alias nied='nix edit -f ""' alias nidf='EDITOR=echo nied' +alias nii="nix-instantiate '' -A" alias nor=nixos-rebuild alias noc=nixos-container -- cgit v1.2.3