diff options
author | Till Höppner | 2019-04-01 21:02:48 +0200 |
---|---|---|
committer | Till Höppner | 2019-04-01 21:02:48 +0200 |
commit | d502ebb035c51a69229e214d539d507fcdeaec30 (patch) | |
tree | caea3e47b85c736a251e51c460ae73edfb4c8c5e | |
parent | 3c3d674ff491481d9b6f5848d00d010592ab0d93 (diff) | |
download | zsh-d502ebb035c51a69229e214d539d507fcdeaec30.tar.gz zsh-d502ebb035c51a69229e214d539d507fcdeaec30.tar.xz zsh-d502ebb035c51a69229e214d539d507fcdeaec30.zip |
nix: add nipr alias
-rw-r--r-- | conf.d/99-nix.zsh | 11 |
1 files changed, 11 insertions, 0 deletions
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 '<nixpkgs>' -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 "<nixpkgs>"' alias nic=nix-channel @@ -18,6 +28,7 @@ alias nir="nix repl '<nixpkgs>'" alias nio=nixops alias nied='nix edit -f "<nixpkgs>"' alias nidf='EDITOR=echo nied' +alias nii="nix-instantiate '<nixpkgs>' -A" alias nor=nixos-rebuild alias noc=nixos-container |