Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit dcb3928

Browse files
committed
add update script for macos machines
1 parent 57343f4 commit dcb3928

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

update-macos.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env nix
2+
#! nix shell --inputs-from .# nixpkgs#bashInteractive nixpkgs#openssh nixpkgs#nix nixpkgs#jq --command bash
3+
4+
set -euo pipefail
5+
6+
targets=(
7+
root@208.83.1.145
8+
root@208.83.1.173
9+
root@208.83.1.181
10+
root@208.83.1.186
11+
root@208.83.1.175
12+
)
13+
14+
for target in "${targets[@]}"; do
15+
path=$(nix flake metadata --json | jq -r '.path')
16+
nix flake archive --to "ssh://$target" "$path"
17+
echo "Updating $target"
18+
ssh "$target" "darwin-rebuild switch --flake $path"
19+
done

0 commit comments

Comments
 (0)