summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-06-14 19:28:57 +0200
committerlassulus <lass@aidsballs.de>2015-06-14 19:28:57 +0200
commitfac851faf9f285310d26a5212ae1bcade615d45b (patch)
tree8b7cd5d2d0a232449c57046bb92846f7e323de6e /bin
parentafa7f0b98d89c9746c204e4ee0dd79e7ae4eb23f (diff)
deploy: take optional target argument
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nixos-deploy7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/nixos-deploy b/bin/nixos-deploy
index 6b841869..d33e9a1d 100755
--- a/bin/nixos-deploy
+++ b/bin/nixos-deploy
@@ -1,13 +1,12 @@
#! /bin/sh
#
-# deploy
+# usage: nixos-deploy HOST [TARGET] [SYSTEM]
#
set -euf
host=$1
-system=${2-$(nixos-build "$host")}
-
-target=root@$host
+target=${2-root@$host}
+system=${3-$(nixos-build "$host")}
nix-copy-closure --gzip --to "$target" "$system"