stockholm/bin/nixos-deploy

17 lines
244 B
Plaintext
Raw Normal View History

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