stockholm/bin/nixos-deploy
2015-06-14 20:57:19 +02:00

17 lines
287 B
Bash
Executable File

#! /bin/sh
#
# nixos-deploy system_name target
#
set -euf
system_name=$1
target=$2
system=$(nixos-build "$system_name")
nix-copy-closure --gzip --to "$target" "$system"
copy-secrets "$system_name" "$target"
ssh ${NIX_SSHOPTS-} "$target" "$system/bin/switch-to-configuration" switch