clan-infra/targets/web01/deploy.sh

15 lines
378 B
Bash
Raw Normal View History

2023-07-19 09:29:29 +00:00
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix jq bash rsync
set -euo pipefail
path=$(nix flake metadata --json '.#' | jq -r .path)
2023-07-19 12:43:30 +00:00
ip=clan.lol
2023-07-19 09:29:29 +00:00
rsync --checksum -vaF --delete -e ssh "${path}/" "root@${ip}:/etc/nixos"
ssh "root@$ip" nixos-rebuild switch \
--fast \
--option keep-going true \
--option accept-flake-config true \
--flake '/etc/nixos#web01'