From 5812813cd5a27da02e60f0470bb57b33169f7818 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 14 Jun 2015 20:57:19 +0200 Subject: deploy: take target as optional argument --- bin/nixos-deploy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/nixos-deploy') diff --git a/bin/nixos-deploy b/bin/nixos-deploy index 6b84186..fa86a8c 100755 --- a/bin/nixos-deploy +++ b/bin/nixos-deploy @@ -1,16 +1,16 @@ #! /bin/sh # -# deploy +# nixos-deploy system_name target # set -euf -host=$1 -system=${2-$(nixos-build "$host")} +system_name=$1 +target=$2 -target=root@$host +system=$(nixos-build "$system_name") nix-copy-closure --gzip --to "$target" "$system" -copy-secrets "$host" +copy-secrets "$system_name" "$target" ssh ${NIX_SSHOPTS-} "$target" "$system/bin/switch-to-configuration" switch -- cgit v1.2.3