add copy command

auto-flake-update
Yorick van Pelt 2018-03-11 23:30:05 +01:00
parent 926e9f6960
commit f368ec2e03
1 changed files with 4 additions and 0 deletions

4
conf
View File

@ -47,6 +47,10 @@ case $1 in
build) build)
exec "$0" exec "$2" nixos-rebuild build exec "$0" exec "$2" nixos-rebuild build
;; ;;
copy)
TARGET_HOST=$(jq -r ".$2.host"<servers.json)
exec "$0" exec "$2" nixos-rebuild build --build-host localhost --target-host "$TARGET_HOST"
;;
boot) boot)
TARGET_HOST=$(jq -r ".$2.host"<servers.json) TARGET_HOST=$(jq -r ".$2.host"<servers.json)
exec "$0" exec "$2" nixos-rebuild --build-host localhost --target-host "$TARGET_HOST" boot exec "$0" exec "$2" nixos-rebuild --build-host localhost --target-host "$TARGET_HOST" boot