summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-06-14 19:37:30 +0200
committerlassulus <lass@aidsballs.de>2015-06-14 19:37:30 +0200
commite59d4f45c04431605a2c2f2988d3127e8982fda7 (patch)
tree47af604a4dccefbecfcb7592cfba1c348aa3b60e
parent84d5eb4174a5bc64d47736b691d09ded5d167575 (diff)
Revert "deploy: take optional target argument"
This reverts commit fac851faf9f285310d26a5212ae1bcade615d45b.
-rwxr-xr-xbin/nixos-deploy7
-rwxr-xr-xdeploy6
2 files changed, 8 insertions, 5 deletions
diff --git a/bin/nixos-deploy b/bin/nixos-deploy
index d33e9a1d9..6b8418696 100755
--- a/bin/nixos-deploy
+++ b/bin/nixos-deploy
@@ -1,12 +1,13 @@
#! /bin/sh
#
-# usage: nixos-deploy HOST [TARGET] [SYSTEM]
+# deploy
#
set -euf
host=$1
-target=${2-root@$host}
-system=${3-$(nixos-build "$host")}
+system=${2-$(nixos-build "$host")}
+
+target=root@$host
nix-copy-closure --gzip --to "$target" "$system"
diff --git a/deploy b/deploy
index e99794ed0..6034196e1 100755
--- a/deploy
+++ b/deploy
@@ -1,9 +1,11 @@
#! /bin/sh
#
-# usage: ./deploy HOST [TARGET]
+# usage: ./deploy HOST
#
set -euf
+host=$1
+
export PATH="$PWD/bin:$PATH"
#export nixpkgs=/var/nixpkgs
export nixpkgs_root=$PWD/tmp/nixpkgs
@@ -11,4 +13,4 @@ export config_root=$PWD
export retiolum_hosts=$PWD/hosts
export secrets_root=$PWD/secrets
-exec nixos-deploy "$@"
+exec nixos-deploy "$host"