2015-05-21 20:33:16 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2015-06-14 17:37:30 +00:00
|
|
|
# deploy
|
2015-05-21 20:33:16 +00:00
|
|
|
#
|
|
|
|
set -euf
|
|
|
|
|
|
|
|
host=$1
|
2015-06-14 17:37:30 +00:00
|
|
|
system=${2-$(nixos-build "$host")}
|
|
|
|
|
|
|
|
target=root@$host
|
2015-05-21 20:33:16 +00:00
|
|
|
|
|
|
|
nix-copy-closure --gzip --to "$target" "$system"
|
|
|
|
|
|
|
|
copy-secrets "$host"
|
|
|
|
|
|
|
|
ssh ${NIX_SSHOPTS-} "$target" "$system/bin/switch-to-configuration" switch
|