summaryrefslogtreecommitdiffstats
path: root/bin/nixos-deploy
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-06-14 20:57:19 +0200
committerlassulus <lass@aidsballs.de>2015-06-14 20:57:19 +0200
commitcb70769a04166a7c7a0d8e92a23f9ae76f768259 (patch)
tree27572e3f2fa4f7e715c64c36619b7a96a223078e /bin/nixos-deploy
parente59d4f45c04431605a2c2f2988d3127e8982fda7 (diff)
deploy: take target as optional argument
Diffstat (limited to 'bin/nixos-deploy')
-rwxr-xr-xbin/nixos-deploy10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/nixos-deploy b/bin/nixos-deploy
index 6b841869..fa86a8c8 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