summaryrefslogtreecommitdiffstats
path: root/next/bin/deploy
blob: 1c1d977da59d4d200543df6aac804e5c6eb70fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/sh
#
# deploy
#
set -euf

host=$1
system=${2-$(build "$host")}

target=root@$host

nix-copy-closure --gzip --to "$target" "$system"

copy-secrets "$host"

ssh ${NIX_SSHOPTS-} "$target" "$system/bin/switch-to-configuration" switch