stockholm/bin/nixos-deploy

17 lines
287 B
Plaintext
Raw Normal View History

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